Displaying 1 result from an estimated 1 matches for "gedi7".
Did you mean:
gedit
2011 Apr 18
2
Working with massive matrices in R
...as follows:
###---------Begin Script here-------###
library(Matrix)
snps <- 527829 ## Number of SNPs
N <- 3200 ## Sample size
y <- rnorm(N, 100,1) ## simulated phenotype
system.time(
## read in matrix 3200 x 527829
x <- scan("gedi7.raw", what=rep(0,snps), nmax=N*snps, skip=1))
system.time(x <- matrix(x,nrow=N,ncol=snps, byrow=TRUE))
print(object.size(x), units="Mb")
###--------End Script----------------####
The scan function finishes without a problem. "x" is in double precision
floating point fo...