ただのメモ

nsample<-100
nmarker<-10
d<-runif(nsample*nmarker)
d<-d-0.5
d<-sign(d)
m<-matrix(d,ncol=nsample)
c<-cov(t(m))
af<-apply(m,1,mean)