How to set a variable in .Renviron

usethis :package: has a useful helper function to modify .Renviron :

  • usethis::edit_r_environ() will open your user .Renviron which is in your home
  • usethis::edit_r_environ("project") will open the one in your project

You should look at how startup works in R. This post is useful:

21 Likes