Problem Loading Rstan in Windows 10 Home, R version 3.6.3

Short summary of the problem
RStan doesn’t run after installing package and pkgbuild

code_to_run_your_model(if_applicable)

If possible, add also code to simulate data or attach a (subset of) the dataset you work with.

Don’t forget to add relevant tags to your topic (top right of this form) especially for application area. Delete this text before posting your question :-) Thx!

If your question relates to installation please provide the following information:

  • Operating System - Windows 10 Home; Version 1909; OS Build 18363.959
  • RStan Version - rstan_2.21.2
  • RTool Version - Rtools35
  • Output of `writeLines(readLines(file.path(Sys.getenv(“HOME”), “.R/Makevars”)))
    Error in file(con, “r”) : cannot open the connection
    In addition: Warning message:
    In file(con, “r”) :
    cannot open file ‘C:/Users/rapha/Documents/.R/Makevars’: No such file or directory
  • Output of devtools::session_info("rstan")
    Error in loadNamespace(name) : there is no package called ‘devtools’

library(“rstan”)
Error: package or namespace load failed for ‘rstan’ in .doLoadActions(where, attach):
error in load action .A.1 for package rstan: Rcpp::loadModule(module = “class_model_base”, what = TRUE, env = ns, : Unable to load module “class_model_base”: cannot allocate vector of size 16550.6 Gb
In addition: Warning messages:
1: package ‘rstan’ was built under R version 3.6.3
2: package ‘StanHeaders’ was built under R version 3.6.3
3: package ‘ggplot2’ was built under R version 3.6.3

If you are reporting a bug (thank you!) please use the issue tracker (github.com/stan-dev/rstan/issues) instead of the forums.

Looking forward to your topic!

Never mind. I installed R 4.0.2 and Rtools40. It seems to work now.

3 Likes