How to Change .libPaths() permanently in R?

前端 未结 4 1437
無奈伤痛
無奈伤痛 2020-12-01 07:52

Whenever I change the library path order using the .libPaths() function, it reverts back to the default if I restart R. How can I change this permanently? I am

4条回答
  •  清歌不尽
    2020-12-01 08:16

    2 major solutions:

    1. In .Rprofile you could leave code that sets .libPaths()

    2. Just set the appropriate environment variable such as R_LIBS in Windows or R_LIBS_SITE= in Linux, etc, to whatever you like, e.g.

       R_LIBS=C:/R/Library 
      

提交回复
热议问题