我用的R版本为4.3.2
直接install.packages("pRRophetic")
显示未找到
BiocManager::install("pRRophetic")
显示package ‘pRRophetic’ is not available for Bioconductor version '3.18'
最后下载压缩包在https://osf.io/5xvsg/wiki/home/中下载
直接装出现
ERROR: dependency 'ridge' is not available for package 'pRRophetic'
- removing 'D:/software/packages/R-2023.11-7/R-4.3.2/library/pRRophetic'
Warning in install.packages :
安装程序包‘E:/##shengxin/#lianshou/PRRophetic/pRRophetic_0.5.tar.gz’时退出狀態的值不是0的问题
后来查询发现没有安装必要的依附包
先BiocManager::install(c('sva', 'car', 'genefilter', 'preprocessCore', 'ridge'))
后面在直接install.packages("./pRRophetic_0.5.tar.gz", repos = NULL, type = "source")
问题解决了,成功下载。
随后在使用的过程中出现了 Error in if (class(testExprData) != "matrix") stop("ERROR: "testExprData" must be a matrix.") : the condition has length > 1
根据搜寻发现在较新的R版本(=4.3.0)下class(matrix)会返回"matrix"和"array"两个属性,而在老版本的R(=3.6.1)只会返回"matrix"
通过查找如何改正后
trace(calcPhenotype, edit = T)
在calcPhenotype函数的第6,8,10,12和66行class(X)后面加个[1]
trace(summarizeGenesByMean, edit = T)
也是在相应的class(x)后面加上[1]