Tricks to manage the available memory in an R session

前端 未结 27 1497
情深已故
情深已故 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:49

    I use the data.table package. With its := operator you can :

    • Add columns by reference
    • Modify subsets of existing columns by reference, and by group by reference
    • Delete columns by reference

    None of these operations copy the (potentially large) data.table at all, not even once.

    • Aggregation is also particularly fast because data.table uses much less working memory.

    Related links :

    • News from data.table, London R presentation, 2012
    • When should I use the := operator in data.table?

提交回复
热议问题