[R] Memory allocation in problem R linux

Dr Stuart Leask stuart.leask at nottingham.ac.uk
Mon Mar 19 10:35:41 CET 2001


Hi folks.

R 1.2.1 --vsize 34M, --nsize 3000k, Slackware Linux 2.2.16 in UMSDOS, P200,
64Mb ram, about 120Mb HD left in that partition (several hundred in another,
if anyone thinks that could help). Runs like a breeze much of the time.

However, using Saikat DebRoy's read.spss from 'foreign' package to read in a
5Mb .SAV file (equivalent to 11Mb of tab-delimited data)
data2<-read.spss('/home/data1.sav')
returns the prompt in under ten seconds.

However, if I then try to take a subset of this, by eg.
sub2.df<-as.data.frame(cbind(v1=data2$v1,v2=data2$v2))
I get "Error: cannot allocate vector of size 441kb". No matter how large I
make vsize or nsize. The data is in, but I can't use it!

I'd prefer to only import some of the SPSS file anyway (cf. using /KEEP in
SPSS), but
- I've tried importing a file with half as many variables, and I get the
same problem - errors as above when I try and do anything with it
- I am told that memory-handling under linux is better than windows!

R under linux must be able to handle datasets like this (about 70 variables,
18,000 cases).
I must be doing something wrong, but fiddling with nsize & vsize doesn't
seem to help. Help!

Stuart

*************************************************************
Stuart Leask MA MRCPsych
Clinical Lecturer in Psychiatry
Duncan Macmillan House
Porchester Road               "Ask a clock how it works, &
Nottingham                    all it will tell you is the time"
UK   NG3 6AA
Tel: +44-0 115 969 1300 xtn 40784 Fax: 0115 955 5352
*************************************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list