Open DianaDaInLee opened 4 years ago
Sorry you're getting an error. I see that you're running RStudio version 1.2.1335 but can you also share which version of R itself you have? You can check that by seeing what print(R.version.string)
says.
Hello -
My R version is: "R version 3.6.1 (2019-07-05)"
Thanks for your help!
Hmm, I have R 4.0.2 and Catalina and it's working ok, and I don't know of any reason why it wouldn't be ok with R 3.6.1.
@bgoodri Have you seen examples of rstan/rstanarm not working with Catalina and R 3.6? Or has this error
Chain 1: empty_nested() must be true before calling recover_memory() [1] "Error in sampler$call_sampler(args_list[[i]]) : " " empty_nested() must be true before calling recover_memory()"
come up before?
Yes, it is different with R 3.6.1 due to using llvm rather than Xcode. You are probably going to have to install rstanarm from source to avoid running into the exception problem.
On Mon, Jul 20, 2020 at 1:21 PM Jonah Gabry notifications@github.com wrote:
Hmm, I have R 4.0.2 and Catalina and it's working ok, and I don't know of any reason why it wouldn't be ok with R 3.6.1.
@bgoodri https://github.com/bgoodri Have you seen examples of rstan/rstanarm not working with Catalina and R 3.6? Or has this error
Chain 1: empty_nested() must be true before calling recover_memory() [1] "Error in sampler$call_sampler(args_list[[i]]) : " " empty_nested() must be true before calling recover_memory()"
come up before?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstanarm/issues/446#issuecomment-661212242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKVC23MWL42F4KR2FZLR4R4LFANCNFSM4PANGLBQ .
I tried re-installing the package using 'install.packages("rstanarm", type = "source")' after seeing this post: https://discourse.mc-stan.org/t/new-user-struggling-to-get-rstanarm-running/13151/2
But it still resulted in the same error. Maybe I missed a subtle detail when re-installing the package. Below is the step I took to re-install the package. Could you please let me know if I've missed any necessary steps?
Thanks,
What is your ~/.R/Makevars file say?
On Mon, Jul 20, 2020 at 1:46 PM dlee0324 notifications@github.com wrote:
I tried re-installing the package using 'install.packages("rstanarm", type = "source")' after seeing this post: https://discourse.mc-stan.org/t/new-user-struggling-to-get-rstanarm-running/13151/2
But it still resulted in the same error. Maybe I missed a subtle detail when re-installing the package. Below is the step I took to re-install the package. Could you please let me know if I've missed any necessary steps?
- Run install.packages("Rcpp", repos = " https://rcppcore.github.io/drat")
- Run remove.packages("rstan") if (file.exists(".RData")) file.remove(".RData")
- Restart R
- Run Sys.setenv(MAKEFLAGS = "-j4")
- Run install.packages("rstan", type = "source")
- install.packages("rstanarm", type = "source")
- Restart R to run the model - still get an error
Thanks,
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstanarm/issues/446#issuecomment-661236225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKVP4FC5UGR3D57GDETR4R7HLANCNFSM4PANGLBQ .
This is what I have under rstantools>include>sys>Makevars
STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include', 'src', package = 'StanHeaders', mustWork = TRUE))" -e "message()" | grep "StanHeaders")
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error
PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")
CXX_STD = CXX14
I mean the Makevars file in your home directory, i.e. ~/.R/Makevars (there is a period before the R in that path).
On Mon, Jul 20, 2020 at 2:19 PM dlee0324 notifications@github.com wrote:
This is what I have under rstantools>include>sys>Makevars
STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include', 'src', package = 'StanHeaders', mustWork = TRUE))" -e "message()" | grep "StanHeaders")
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()") PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")
CXX_STD = CXX14
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstanarm/issues/446#issuecomment-661253952, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKRHGUQCMSBS4MHIOKTR4SDBPANCNFSM4PANGLBQ .
I don't think I have such folder in my home directory... however, I just re-run the install.packages("rstan", type = "source") from a clean slate and it seems to work now - hurray!
Glad that it's working now!
Yes, it is different with R 3.6.1 due to using llvm rather than Xcode. You are probably going to have to install rstanarm from source to avoid running into the exception problem.
@bgoodri So does any with R 3.6.1 need to install from source? If so is there any way for them to find that out besides opening an issue here? That seems like an important piece of information.
I am somewhat hopeful that the rstanarm binaries for Mac on R 3.6.1 will eliminate this problem. Those had never before been built with the CRTP approach in the code now.
On Mon, Jul 20, 2020 at 4:38 PM Jonah Gabry notifications@github.com wrote:
Glad that it's working now!
Yes, it is different with R 3.6.1 due to using llvm rather than Xcode. You are probably going to have to install rstanarm from source to avoid running into the exception problem.
@bgoodri https://github.com/bgoodri So does any with R 3.6.1 need to install from source? If so is there any way for them to find that out besides opening an issue here? That seems like an important piece of information.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstanarm/issues/446#issuecomment-661320739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ2XKWNMU35X3XCHUGYMYDR4STM3ANCNFSM4PANGLBQ .
Ok I hope that works!
Summary:
I'm trying to run the MRP demo provided at https://cran.r-project.org/web/packages/rstanarm/vignettes/mrp.html but am getting an error when running stan_glmer().
Description:
I run the same model using the same sample data from the website:
but get the following error:
I tried re-installing rstanarm using install.packages("rstanarm", type = "source") as suggested in the other post but it did not work.
RStanARM Version:
R Version:
Version 1.2.1335 © 2009-2019 RStudio, Inc.
Operating System:
macOS Catalina Version 10.15.5