1

and cause and session abort. Even re-installation of and cause the error.

enter image description here

enter image description here

sessionInfo()
R version 4.2.0 (2022-04-22 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0    pacman_0.5.1 

Edited

It is a bug in and that cause 4.2.0 and session abort. Bug reported here:

rstan issues

brms issues

Phil
  • 7,287
  • 3
  • 36
  • 66
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
  • Not sure if this would work but you could try to set `options(mc.cores = parallel::detectCores())` – Basti May 09 '22 at 08:29
  • Thanks @Basti for your comment. I tried `options(mc.cores = parallel::detectCores())` but getting the same error. – MYaseen208 May 09 '22 at 08:35
  • What happens if you try to load the packages in vanilla R (not Rstudio)? Might help isolate whether this is an R error or Rstudio error. – SamR May 09 '22 at 08:52
  • @SamR: Getting the same error. – MYaseen208 May 09 '22 at 09:09
  • 1
    OK... I see you are running R 4.2. Can you load these packages in previous versions of R? Others seem to have had issues loading these packages in 4.2, e.g. [here](https://github.com/stan-dev/rstan/issues/1007) – SamR May 09 '22 at 09:12
  • Yes @SamR, I'm using `R 4.2.0` and getting the same error as given [here](https://github.com/stan-dev/rstan/issues/1007). Any solution please. – MYaseen208 May 09 '22 at 09:16
  • 1
    I don't have a solution. I think you'd do better to raise it as a github issue for the package and use an R <= 4.2.0 until the package maintainers release a fix. – SamR May 09 '22 at 09:20
  • @MYaseen208 Sam was asking if you could downgrade your version of R to try again. You just responded that you are using the most up to date version. – Phil May 09 '22 at 13:41

1 Answers1

0

Thanks to @bschneidr for providing solution here. Reinstalling rstan along with its some dependencies as given below works for me.

install.packages(c("BH", "StanHeaders", "Rcpp", "RcppEigen", "RcppParallel", "inline", "loo", "pkgbuild", "rstan"))
MYaseen208
  • 22,666
  • 37
  • 165
  • 309