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
.libPaths()
2 major solutions:
In .Rprofile you could leave code that sets .libPaths()
.Rprofile
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
R_LIBS_SITE=
R_LIBS=C:/R/Library