Skip to content

Instantly share code, notes, and snippets.

@danmackinlay
Created February 7, 2021 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danmackinlay/f625d2e219a5519751b28127dd23fe0f to your computer and use it in GitHub Desktop.
Save danmackinlay/f625d2e219a5519751b28127dd23fe0f to your computer and use it in GitHub Desktop.
.Rprofile that prevents using linxubrew paths, which breaks compilation.
# R should not use the linuxbrew paths.
# this laborious workaround prevents that
.pth = Sys.getenv("PATH")
.pths = unlist(strsplit(.pth, ":"))
.nbrewpthi = as.vector(unlist(lapply(.pths, function (x) !grepl("brew", x))))
Sys.setenv(PATH=paste(.pths[.nbrewpthi], collapse=":"))
print("Changed PATH")
print(.pth)
print("to")
print(Sys.getenv("PATH"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment