By default (in Windows), R saves libraries to a path that is something like:
C:\Users\(username)\R\3.3
I would like to change the C:\Users\(username) part of that, but still allow R to assign the R\3.3 part. I.e., when I update R, it should start using R\3.4, etc..
You can change the entire install path by setting the environment variable R_LIBS_USER. Is there an environment variable for just the prefix?
Use the pattern %v in the value of R_LIBS_USER. This is documented in the libPaths documentation.
Note that this only works if the path actually exists: .libPaths will ignore nonexistent paths.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With