Tricks to manage the available memory in an R session

前端 未结 27 2065
情深已故
情深已故 2020-11-22 01:23

What tricks do people use to manage the available memory of an interactive R session? I use the functions below [based on postings by Petr Pikal and David Hinds to the r-he

27条回答
  •  庸人自扰
    2020-11-22 01:44

    That's a good trick.

    One other suggestion is to use memory efficient objects wherever possible: for instance, use a matrix instead of a data.frame.

    This doesn't really address memory management, but one important function that isn't widely known is memory.limit(). You can increase the default using this command, memory.limit(size=2500), where the size is in MB. As Dirk mentioned, you need to be using 64-bit in order to take real advantage of this.

提交回复
热议问题