### R代码从vignette源的ppa -vignette。Rnw ' ################################################### ### 代码块1号:获取数据 ################################################### 需要(snpStats)数据(for.exercise)控制< - rownames (subject.support)[主题。支持$cc==0] use <- seq(1, ncol(snps.10), 10) ctl。10 <- snps。10[控制,使用 ] ################################################### ### 代码块2号:xxt-matrix ################################################### xxmat < - xxt (ctl。10, correct.for.missing = FALSE ) ################################################### ### 代码块3号:特征 ################################################### evv < -特征(xxmat对称= TRUE)电脑< - evv美元向量[1:5]评价< - evv美元值[1:5]测评 ################################################### ### 代码块数量4:pc-one ################################################### 流行< -主题。支持(控制,“层”)标准(mfrow = c(1、2)箱线图(pc[1] ~流行)箱线图(pc[2] ~流行 ) ################################################### ### 代码块5号:pre-multiply ################################################### btr < - snp.pre.multiply (ctl。10、诊断接头(1 /√(测评))% * % t(个人电脑 )) ################################################### ### 代码块6号:post-multiply ################################################### 电脑< - snp.post.multiply (snp。10[使用],t (btr )) ################################################### ### 代码块数量7:测试 ################################################### cc < -主题。支持$cc uncorrected <- single.snp。测试(cc, snp.data=snps.10)已纠正<- snp.rhs。测试(cc~pcs[,1], snp.data=snps.10) par(mfrow=c(1,2),cex.sub=0.85) qq.chisq(chi.squared(uncorrected,1), df=1) qq.chisq(chi.squared(corrected), df=1)