[R] Out of memory issue

Neotropical bat risk assessments neotropical.bats at gmail.com
Tue Apr 28 12:04:04 CEST 2009


   Hi again all,
   I can read all of the data is in CSV format with a header row and with
   1,200,240 rows.
   I can do all the plots and ggplot2 has no problems.
   Seems to be a problem with the MASS package???
   It seems that the contour plots are the problem with the memory error.
   Error: cannot allocate vector of size 228.9 Mb
   I can run smaller data sets and do the contour plots w/o problems.
   The data can not really be summarized as I need to plot the actual values to
   get the insight into the large data sets.
   I am using latest R version 2.9.0 (2009-04-17)
   My alternative is to bump up the memory of my one Dell workstation to 16 GB
   as it runs with Ubuntu and can access that amount if I figure out how to
   install R on a Linux box.
   It may not truly be a memory issue but a limit to how MASS does the contour
   plots?
   This works 100% with the large data sets.
   Bodega <- read.csv ("C:/R-Stats/Bat calls/Bodega.csv")
   attach(Bodega)
   library(ggplot2)
   f=jpeg(file="Bodega Sc_Fc plot.jpg")
   print(qplot(Sc, Fc))
   dev.off()
   f=jpeg(file="Bodega Fc Dens plot.jpg")
       print(qplot(Fc,geom="density"))
   dev.off()
   This does not.and I get the vector size error.
   library(MASS)
   library(batcalls)
   BRC<-kde2d(Sc,Fc)
   f=jpeg(file="Rainey contour plot.jpg")
   filled.contour(BRC)
            dev.off()
   Thanks again for in sight as I trundle up the learn curve for R.
   Bruce



More information about the R-help mailing list