Short summary of the problem
I am trying to model with stan in R but I am running into multiple errors which after a few hours I am at a loss on how to progress. I try installing cmdstan:
install_cmdstan( dir = NULL, cores = getOption("mc.cores", 2), quiet = FALSE, overwrite = FALSE, timeout = 1200, version = NULL, release_url = NULL, cpp_options = list(), check_toolchain = TRUE )
I then get an error:
Rtools42 installation found but the toolchain was not installed.
Run cmdstanr::check_cmdstan_toolchain(fix = TRUE) to fix the issue.
I then run the suggested code to try and fix the issue:
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
Installing mingw32-make and g++ with Rtools42.
processx::run("pacman", args = c("-Sy", install_pkgs, "--noconfirm"), …:
! System command ‘pacman’ failed
Exit status: 1
error: failed to synchronize all databases (unable to lock database)
I am not really sure how to proceed or remedy this issue. I tried consulting this post (Trouble with cmdstan toolchain with RTools42 on Windows 10 Enterprise) but was unable to fix the problem.
- Operating System:
- RStan Version:
- Output of
Error in file(con, “r”) : cannot open the connection
In addition: Warning message:
In file(con, “r”) :
cannot open file ‘C:/Users/willi/Documents/.R/Makevars’: No such file or directory
- Output of
version R version 4.2.2 (2022-10-31 ucrt)
os Windows 10 x64 (build 22000)
system x86_64, mingw32
collate English_United States.utf8
ctype English_United States.utf8
rstudio 2022.07.1+554 Spotted Wakerobin (desktop)
pandoc 2.18 @ C:/Program Files/RStudio/bin/quarto/bin/tools/ (via rmarkdown)