Unless you're using an out-of-memory solution to manage large data objects (such as the RevoScaleR package in Revolution R Enterprise), then R always allocates memory for every object in your working session. If you're working with many objects (or even just a few large objects) then you'll need to take care to manage R's memory usage to avoid the dreaded "cannot allocate memory" error. This question on StackOverflow offers several handy tips, including an enhanced version of the objects function to identify the biggest memory hogs for deletion.
StackOverflow: Tricks to manage the available memory in an R session? (via)
Question: Why does REngine.exe sit on a gigabyte of RAM when it's not doing anything? No processes are running and I just executed rm(list=ls()). Theoreticelly, R isn't doing anything, so in addition to the few megabytes of memory required to keep the IDE up, I don't understand why the engine is consuming a gig of RAM. Needless to say this makes it really difficult to use.
Posted by: Peter Williams | February 13, 2012 at 13:35