The Computer Oracle

Change RStudio library path at home directory

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Track title: CC F Haydns String Quartet No 53 in D

--

Chapters
00:00 Change Rstudio Library Path At Home Directory
00:30 Accepted Answer Score 13
00:52 Answer 2 Score 1
01:11 Thank you

--

Full question
https://superuser.com/questions/749283/c...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#path #r #rstudio

#avk47



ACCEPTED ANSWER

Score 13


I got answer:

Edit file ~/.Renviron, add

R_LIBS_USER=/some/path

Next time RStudio starts, it will create directories in /some/path instead of ~/R.




ANSWER 2

Score 1


I found really useful this post:

https://community.rstudio.com/t/how-to-set-a-variable-in-renviron/5029/4

It shows hwo you can also use an helper function you can find in the package usethis to modify .Renviron:

usethis::edit_r_environ()