0

all.

I try to call rstan by library(rstan) However, I got the message below. I was wondering how I can successfully call rstan. It seems that I succeeded to install it.

Loading required package: StanHeaders
Loading required package: ggplot2
Error: package or namespace load failed for ‘rstan’:
 .onLoad failed in loadNamespace() for 'rstan', details:
  call: get_rng(0)
  error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
In addition: Warning messages:
1: package ‘rstan’ was built under R version 4.1.2 
2: package ‘StanHeaders’ was built under R version 4.1.2 
3: package ‘ggplot2’ was built under R version 4.1.2 

Thank you,

Nad Pat
  • 3,129
  • 3
  • 10
  • 20
  • You need to update your version of Rcpp. Try `install.packages('Rcpp')` – MrFlick Dec 09 '21 at 06:18
  • I tried and still see the message below. rstan (Version 2.21.2, GitRev: 2e1f913d3ca3) For execution on a local, multicore CPU with excess RAM we recommend calling options(mc.cores = parallel::detectCores()). To avoid recompilation of unchanged Stan programs, we recommend calling rstan_options(auto_write = TRUE) Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file Warning messages: 1: package ‘rstan’ was built under R version 4.1.2 2: package ‘StanHeaders’ was built under R version 4.1.2 3: package ‘ggplot2’ was built under R version 4.1.2 – user17632735 Dec 09 '21 at 06:48
  • That looks fine. That's not an error. – MrFlick Dec 09 '21 at 06:58

0 Answers0