Skip to content

Instantly share code, notes, and snippets.

@ljcolling
Last active October 30, 2019 12:52
Show Gist options
  • Select an option

  • Save ljcolling/635efa44a81e70ca7e2815719643454b to your computer and use it in GitHub Desktop.

Select an option

Save ljcolling/635efa44a81e70ca7e2815719643454b to your computer and use it in GitHub Desktop.
setup<-function(){
user_renviron = path.expand(file.path("~", ".Renviron"))
if(!file.exists(user_renviron)){ # check to see if the file already exists
file.create(user_renviron)
conn = file(user_renviron)
writeLines("R_LIBS_USER=\"N:/Documents/R/win-library/3.6\"\nR_USER=\"N:/Documents\"\nHOME=\"N:/Documents\"",
con = conn)
close(conn)}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment