cortestmatrices(coRNAi)
cortestmatrices()所属R语言包:coRNAi
Function to extract correlations and corresponding p-values from interaction matrix.
提取相关的功能和相应的相互作用矩阵的p值。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This is a wrapper function for cor.test, given a matrix of interaction values, correlations and corresponding p-values for the genewise interaction profiles are calculated.
这是一个包装函数cor.test,互动的价值观,相关和相应的p值2-6。互动型材计算矩阵。
用法----------Usage----------
cortestmatrices(mat, method = c("pearson", "kendall", "spearman"))
参数----------Arguments----------
参数:mat
mat interaction matrix
mat相互作用矩阵
参数:method
character deciding which correlation method should be used
性格决定应使用的相关法
值----------Value----------
List of two matrices
两个矩阵名单
参数:cor.matrix
matrix with correlations
与相关矩阵
参数:p.matrix
matrix with p-values
p值的矩阵
作者(S)----------Author(s)----------
Elin Axelsson
参见----------See Also----------
cor.test
cor.test
举例----------Examples----------
## simulate data with 2 genes with similar profiles[#模拟数据与2个基因具有类似型材]
mat = matrix(rnorm(100*100,0,1),100,100)
pr = sample(2:10,100,replace=TRUE)
mat[1:2,] = mat[1:2,] + matrix(pr,ncol=100,nrow=2,byrow=TRUE)
mat = mat+t(mat)
diag(mat) = NA
dimnames(mat)=list(1:100,1:100)
res = cortestmatrices(mat,method="spearman")
cors= res[[1]]
ps = res[[2]]
print(which(ps==min(ps,na.rm=TRUE),arr.ind=TRUE))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|