multiple

Comparing multiple AUCs in parallel (R)

こ雲淡風輕ζ 提交于 2020-03-23 07:46:10
问题 I am using the pROC package in r to calculate and compare the AUCs of multiple tests, to see which test has the best ability to discriminate between patients and controls. However, I have a large number of tests and essentially want to run a series of pairwise comparisons of each tests AUC with every other test and then correct for multiple comparisons. This is as far as I've gotten with my code (example with simulated and replicable dataset below): #load pROC library(pROC) #generate df with

How do I get the median of multiple columns in R with conditions (according to another column)

白昼怎懂夜的黑 提交于 2020-03-16 06:50:07
问题 I'm a beginner in R and I would like to know how to do the following task: I want to replace the missing values of my dataset by the median for all the columns of my dataset. However, for each column, I want the median of a certain category (depending on another column).My dataset is as follows structure(list(Country = structure(1:5, .Label = c("Afghanistan", "Albania", "Algeria", "Andorra", "Angola"), class = "factor"), CountryID = 1:5, Continent = c(1L, 2L, 3L, 2L, 3L), Adolescent.fertility

使用Homebrew安装一个Formula的多个不同版本

丶灬走出姿态 提交于 2019-12-04 20:19:31
Homebrew是mac os x系统下一个非常优秀的软件包管理工具,个人认为比macports好用,本文介绍了使用homebrew如何安装一个软件包的多个版本并随意切换。 例如已经使用brew install gradle安装了最新版本1.9,现在我要安装gradle1.8并切换到1.8,那么进行如下操作: 1. brew versions gradle 2. homebrew本身就是一个git仓库,这里我们看到了gradle各个版本的记录,于是我们需要checkout出1.8版本,进入/usr/local目录下,执行 3. 然后先使用brew unlink gradle,删除对1.9的引用,继而再使用 brew install gradle即可,brew会自动下载1.8版本的gradle代码进行安装; 4. 完成之后gradle1.8分支是没有用了,我们可以将其删除: 当然了,,不删除也没什么影响,楼主自己不太喜欢没用的东西放在系统里 5. 这样我们就同时安装上了gradle1.8和1.9版本,可以使用ls查看: 使用brew info gradle可以很清楚的看到有两个版本的gradle,而且1.8版本后面有个*号,表示当前使用 6. 使用brew switch gradle 1.8/1.9随意切换版本: 7. 另外最后还给出一个使用homebrew的小技巧: