Other sites

Tricks to manage memory in an R session

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.