Monday, April 20, 2015

Create matrix with repeating element in R

gwas<-matrix(rep("GWAS phenotype", 20),nrow=20,ncol=1)

> gwas
      [,1]
 [1,] "GWAS phenotype"
 [2,] "GWAS phenotype"
 [3,] "GWAS phenotype"
 [4,] "GWAS phenotype"
 [5,] "GWAS phenotype"
 [6,] "GWAS phenotype"
 [7,] "GWAS phenotype"
 [8,] "GWAS phenotype"
 [9,] "GWAS phenotype"
[10,] "GWAS phenotype"
[11,] "GWAS phenotype"
[12,] "GWAS phenotype"
[13,] "GWAS phenotype"
[14,] "GWAS phenotype"
[15,] "GWAS phenotype"
[16,] "GWAS phenotype"
[17,] "GWAS phenotype"
[18,] "GWAS phenotype"
[19,] "GWAS phenotype"
[20,] "GWAS phenotype"

No comments:

Post a Comment