Skip to content

Instantly share code, notes, and snippets.

@kylebaron
Created March 15, 2016 18:07
Show Gist options
  • Save kylebaron/f9743320344fe4cf340f to your computer and use it in GitHub Desktop.
Save kylebaron/f9743320344fe4cf340f to your computer and use it in GitHub Desktop.
Check or set PATH
# Check your current path
path0 <- Sys.getenv("PATH")
path0
# You need to check the specifics of where Rtools is located on your system
path <- "C:\\Program Files\\R\\R-3.2.3\\bin\\x64;c:\\Rtools32\\bin;c:\\Rtools32\\gcc-4.6.3\\bin;"
# Create a new path
path <- paste0(path,path0,sep=";")
# Set the path
Sys.setenv(PATH=path)
# Check the path again
Sys.getenv("PATH")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment