Hi, first post here… For reference I am on a Win10_64 machine.
I have been successfully using stan 2.17.3 for a while now but recently upgraded to R 3.5.1 and while I was at it upgraded rstan to 2.18.1 and Stanheaders 2.18.0.
However I can now no longer get models to compile. For example, if I run the following example model I get
stancode <- ‘data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}’
mod <- stan_model(model_code = stancode, verbose=T)
TRANSLATING MODEL ‘73fc79f8b1915e8208c736914c86d1a1’ FROM Stan CODE TO C++ CODE NOW.
successful in parsing the Stan model ‘73fc79f8b1915e8208c736914c86d1a1’.
COMPILING THE C++ CODE FOR MODEL ‘73fc79f8b1915e8208c736914c86d1a1’ NOW.
OS: x86_64, mingw32; rstan: 2.18.1; Rcpp: 0.12.19; inline: 0.3.15
Error in eval(substitute(expr), data, enclos = parent.frame()) : **
** is.character(repos) is not TRUE
A traceback() gives…
14: stop(simpleError(msg, call = sys.call(-1)))
13: stopifnot(no(“func”) || is.function(func), no(“func”) || is.list(args),
is.character(libpath), is.character(repos), no(“stdout”) ||
is.null(stdout) || is_string(stdout), no(“stderr”) ||
is.null(stderr) || is_string(stderr), no(“error”) ||
is_string(error), is.character(cmdargs), no(“echo”) ||
is_flag(echo), no(“show”) || is_flag(show), no(“callback”) ||
is.null(callback) || is.function(callback), no(“block_callback”) ||
is.null(block_callback) || is.function(block_callback),
no(“spinner”) || is_flag(spinner), is_flag(system_profile),
is_flag(user_profile), is.character(env), no(“timeout”) ||
(length(timeout) == 1 && !is.na(timeout)), no(“wd”) ||
is_string(wd), no(“fail_on_status”) || is_flag(fail_on_status))
12: eval(substitute(expr), data, enclos = parent.frame())
11: eval(substitute(expr), data, enclos = parent.frame())
10: with.default(options, stopifnot(no(“func”) || is.function(func),
no(“func”) || is.list(args), is.character(libpath), is.character(repos),
no(“stdout”) || is.null(stdout) || is_string(stdout), no(“stderr”) ||
is.null(stderr) || is_string(stderr), no(“error”) ||
is_string(error), is.character(cmdargs), no(“echo”) ||
is_flag(echo), no(“show”) || is_flag(show), no(“callback”) ||
is.null(callback) || is.function(callback), no(“block_callback”) ||
is.null(block_callback) || is.function(block_callback),
no(“spinner”) || is_flag(spinner), is_flag(system_profile),
is_flag(user_profile), is.character(env), no(“timeout”) ||
(length(timeout) == 1 && !is.na(timeout)), no(“wd”) ||
is_string(wd), no(“fail_on_status”) || is_flag(fail_on_status)))
9: with(options, stopifnot(no(“func”) || is.function(func), no(“func”) ||
is.list(args), is.character(libpath), is.character(repos),
no(“stdout”) || is.null(stdout) || is_string(stdout), no(“stderr”) ||
is.null(stderr) || is_string(stderr), no(“error”) ||
is_string(error), is.character(cmdargs), no(“echo”) ||
is_flag(echo), no(“show”) || is_flag(show), no(“callback”) ||
is.null(callback) || is.function(callback), no(“block_callback”) ||
is.null(block_callback) || is.function(block_callback),
no(“spinner”) || is_flag(spinner), is_flag(system_profile),
is_flag(user_profile), is.character(env), no(“timeout”) ||
(length(timeout) == 1 && !is.na(timeout)), no(“wd”) ||
is_string(wd), no(“fail_on_status”) || is_flag(fail_on_status)))
8: convert_and_check_my_args(as.list(environment()))
7: callr::rcmd_safe(“config”, “CC”)
6: gsub("\n", “”, callr::rcmd_safe(“config”, “CC”)$stdout)
5: scan_config_for_rtools(debug)
4: has_rtools()
3: pkgbuild::with_build_tools(cxxfunction(sig = sig, body = body,
plugin = plugin, includes = includes, settings = settings,
…, verbose = verbose))
2: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap("",
model_name, “”);", sep = “”), includes = inc, plugin = “rstan”,
save_dso = save_dso | auto_write, module_name = paste(“stan_fit4”,
model_cppname, “_mod”, sep = “”), verbose = verbose)
1: stan_model(model_code = stancode, verbose = T)
Not sure where I have come unstuck… I followed the rstan (windows) installation guide pretty closely and hence, have the recommended makevars file and compiler flags set. I have Rtools 3.5 installed and I can successfully compile from source…
Any help much appreciated
cheers
Dave