Just upgraded from Big Sur to Monterey (macOS 12.2.1). And can’t get RStan (re)installed. Per “RStan getting started,” I tried, first,
remove.packages(“rstan”)
if (file.exists(“.RData”)) file.remove(“.RData”)
And then,
Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1) # only necessary for Linux without the nodejs library / headers
install.packages(“rstan”, repos = “https://cloud.r-project.org/”, dependencies = TRUE)
Which yields the following error message:
Warning in install.packages :
dependency ‘parallel’ is not available
trying URL ‘https://cloud.r-project.org/bin/macosx/contrib/4.1/rstan_2.21.3.tgz’
Content type ‘application/x-gzip’ length 24540870 bytes (23.4 MB)
==================================================
downloaded 23.4 MB
Then, when I run the suggested code to verify the installation,
example(stan_model, package = “rstan”, run.dontrun = TRUE)
I get the following:
Error: package or namespace load failed for ‘rstan’:
package ‘parallel’ does not have a namespace
Called from: value[3L]
But per this documentation, parallel has been in r-core since 2.14.0 (?). Yet, it looks like R is nonetheless complaining that it’s missing.
I tried using, instead, dependencies = FALSE
:
Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1) # only necessary for Linux without the nodejs library / headers
install.packages(“rstan”, repos = “https://cloud.r-project.org/”, dependencies = FALSE)
But I still get the same error message when I run the verification code.
So I’m stuck. Suggestions?