[R] R vs S-PLUS with regard to memory usage
Anantha Prasad/NE/USDAFS
aprasad at fs.fed.us
Mon Oct 2 20:58:00 CEST 2000
I am trying to translate code from S-PLUS to R and R really struggles!
After starting R with the foll.
R --vsize 50M --nsize 6M --no-restore
on a 400 MHz Pentium with 192 MB of memory running Linux (RH 6.2),
I run a function that essentially picks up an external dataset with 2121
rows
and 30 columns and builds a lm() object and also runs step() ... the step()
takes forever to run...(takes very little time in S-PLUS).
I remove the objects whenever I am done with them hoping that it'll free up
the
memory....but this does not seem to help.
THen I present the user a choice (tk radiobutton using tcltk package) to
choose between residual plot and actual vs predicted plot and then allow
the user to identify the outliers...here, after the first choice, there is
lot of disk activity ..which makes me suspect that it has run out of memory
and swapping from disk ...this takes an enormous amount of time....after
which it seems to run OK.
The application that took seconds to run in S-PLUS takes forever in
R....why is it?...I feel that a --vsize of 50 MB is plenty for a 2121/30
dataset (correct?) ....does R after having taken 50 MB chunk of memory,
handle it poorly, run out of it and start swapping to disk?? .... or am I
neglecting to do something? I am beginning to suspect that R is not the
language to use when writing applications like mine.
Please enlighten me on what is happening.
Thanks much.
*****************************************************************
Mr. Anantha Prasad, Ecologist/GIS Specialist
USDA Forest Service, 359 Main Rd.
Delaware OHIO 43015 USA
Ph: 740-368-0103 Email: aprasad at fs.fed.us
Web: http://www.fs.fed.us/ne/delaware/index.html
Don't Miss Climate Change Tree Atlas at:
http://www.fs.fed.us/ne/delaware/atlas/index.html
******************************************************************
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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