Alternative to R's `memory.size()` in linux?

前端 未结 3 856
无人及你
无人及你 2020-12-11 15:37

R\'s memory.size() is a Windows only. For other functions (such as windows()) the help page gives pointer to non-windows counterparts.

3条回答
  •  遥遥无期
    2020-12-11 16:09

    Yes, memory.size() and memory.limit() is not working in linux/unix. I can suggest unix package.

    To increase the memory limit in linux:

    install.packages("unix") 
    library(unix)
    rlimit_as(1e12)  #increases to ~12GB
    

    You can also check the memory with this:

    rlimit_all()
    

    for detailed information: https://rdrr.io/cran/unix/man/rlimit.html

    also you can find further info here: limiting memory usage in R under linux

提交回复
热议问题