zhengxwen / SNPRelate

R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only)
http://www.bioconductor.org/packages/SNPRelate
98 stars 25 forks source link

R Error : '...' used in the wrong context #30

Closed marieBvr closed 6 years ago

marieBvr commented 6 years ago

Hi, I'm following your tutorial on http://corearray.sourceforge.net/tutorials/SNPRelate/#snpgdscreategeno with my own gds file. I encounter an error with the following part : for (i in 1:length(sample.id)) { g <- ... write.gdsn(var.geno, g, start=c(1,i), count=c(-1,1)) }

It sends me : R Error : '...' used in the wrong context

Any idea how to resolve this ?

Thanks Marie

zhengxwen commented 6 years ago

You should write your code in the place of .... E.g., g <- rep(0, n_snp) where n_snp is the number of SNPs.

marieBvr commented 6 years ago

It works. Thanks