snp.cor(chopsticks)
snp.cor()所属R语言包:chopsticks
Correlations with columns of a snp.matrix
与一个snp.matrix的列的相关性
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function calculates Pearson correlation coefficients between columns of a snp.matrix and columns of an ordinary matrix. The two matrices must have the same number of rows. All valid pairs are used in the computation of each correlation coefficient.
此函数计算之间snp.matrix和一个普通的矩阵列列的Pearson相关系数。两个矩阵必须具有相同的行数。使用所有有效的对各相关系数的计算。
用法----------Usage----------
snp.cor(x, y)
参数----------Arguments----------
参数:x
An <VAR>N</VAR> by <VAR>M</VAR> snp.matrix
一个<VAR>列印</功> <VAR> M </ VAR的>snp.matrix
参数:y
An <VAR>N</VAR> by <VAR>P</VAR> general matrix
一个<VAR>列印</无功> <VAR>,P </无功>通用矩阵
Details
详情----------Details----------
This can be used together with xxt and eigen to calculate standardized loadings in the principal components
这可以用来连同xxt和eigen计算标准化负荷的主要组成部分
值----------Value----------
An <VAR>M</VAR> by <VAR>P</VAR> matrix of correlation coefficients
一个<VAR> M“/无功>按<VAR>,P </无功>矩阵的相关系数
注意----------Note----------
This version cannot handle X chromosomes
此版本不能处理的X染色体
作者(S)----------Author(s)----------
David Clayton <a href="mailto:david.clayton@cimr.cam.ac.uk">david.clayton@cimr.cam.ac.uk</a>
参见----------See Also----------
xxt
xxt
举例----------Examples----------
# make a snp.matrix with a small number of rows[与少数的行1 snp.matrix]
data(testdata)
small <- Autosomes[1:100,]
# Calculate the X.X-transpose matrix[计算X.X转置矩阵]
xx <- xxt(small, correct.for.missing=TRUE)
# Calculate the principal components[计算的主要组成部分]
pc <- eigen(xx, symmetric=TRUE)$vectors
# Calculate the loadings in first 10 components,[计算前10个组件的负荷,]
# for eaxample to plot against chromosome position[,为eaxample对染色体上的位置绘制]
loadings <- snp.cor(small, pc[,1:10])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|