[R] Memory limits using read.table on Windows XP Pro

Latchezar Dimitrov ldimitro at wfubmc.edu
Wed Jul 20 03:46:50 CEST 2005


Hello everyone,

Would you please somebody explain me what my sin is (please see the code
and timing bellow)? And how to improve myself and the following piece of
R code? BTW, the code works.

This is R 64-bit built by myself on Sun SPARC Solaris 9 with gcc-4.0.1
(64-bit) also built by yours truly. The machine is Sun Fire-V880 with
32GB memory and 8 cpu's. Nobody else was using it.


Thank you very much

Latchezar Dimitrov

PS. Prof. Brian D. Ripley, thank you very much for not wasting your
invaluable time responding to the above. I know your answer anyway.
Sorry for making you read it though ...

>  system.time(
+ haplo[i,2*j-1]<-substr(as.character(geno[i,j]),1,1)
+  ,TRUE)
[1] 66.27 13.67 80.02  0.00  0.00
> ls()
[1] "P"     "geno"  "haplo" "i"     "j"     "lr"    "model" "pheno"
> i
[1] 1
> j
[1] 1
> dim(P)
[1]      1 125000
> str(P)
 num [1, 1:125000] 0.6188 0.0533 0.0893 0.8994 0.0316 ...
> str(pheno)
`data.frame':   2500 obs. of  11 variables:
 $ pca    : int  1 1 1 1 1 1 1 1 1 1 ...
 $ her    : int  0 1 0 0 0 0 0 0 0 0 ...
 $ age    : num  67.1 70.4 64.9 60.8 64.3 ...
 $ t      : int  1 3 1 2 1 2 1 3 9 1 ...
 $ n      : int  9 9 9 9 9 9 9 0 9 9 ...
 $ m      : int  0 1 0 0 0 1 9 9 1 9 ...
 $ diffgrd: int  9 9 9 2 9 9 9 9 3 9 ...
 $ gs     : int  6 7 6 7 7 7 5 6 NA 6 ...
 $ psa    : num  13 75 11.3 13 9.1 51 4.3 10.7 NA 93 ...
 $ geo    : int  2 2 1 1 1 1 1 1 1 1 ...
 $ ageg   : int  6 7 5 5 5 5 3 5 4 5 ...
> str(geno)
`data.frame':   2500 obs. of  125000 variables:
^C

> 
> dim(geno)
[1]   2500 125000
> dim(haplo)
[1]   2500 250000
> version()
Error: attempt to apply non-function
> version  
         _                   
platform sparc-sun-solaris2.9
arch     sparc               
os       solaris2.9          
system   sparc, solaris2.9   
status   Patched             
major    2                   
minor    1.1                 
year     2005                
month    07                  
day      09                  
language R                   
>




More information about the R-help mailing list