Skip to content

Instantly share code, notes, and snippets.

@mages
Last active October 6, 2015 12:30
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 mages/c45e9be1ef6c735a9cca to your computer and use it in GitHub Desktop.
Save mages/c45e9be1ef6c735a9cca to your computer and use it in GitHub Desktop.
library(rstan)
rtools <- "C:\\Rtools\\bin"
gcc <- "C:\\Rtools\\gcc-4.6.3\\bin"
path <- strsplit(Sys.getenv("PATH"), ";")[[1]]
new_path <- c(rtools, gcc, path)
new_path <- new_path[!duplicated(tolower(new_path))]
Sys.setenv(PATH = paste(new_path, collapse = ";"))
# The above overcomes:
# Error in compileCode(f, code, language = language, verbose = verbose) :
# Compilation ERROR, function(s)/method(s) not created! Warning message:
# running command 'make -f "D:/PROGRA~2/R/R-31~1.0/etc/i386/Makeconf" -f "D:/PROGRA~2/R/R-31~1.0/share/make/winshlib.mk" -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment