diff --git a/R/rstan_config.R b/R/rstan_config.R index 87f8750..d697eb3 100644 --- a/R/rstan_config.R +++ b/R/rstan_config.R @@ -236,6 +236,8 @@ rstan_config <- function(pkgdir = ".") { } else { cppcode <- c("#include ", cppcode) } + rng_type <- ifelse(utils::packageVersion('StanHeaders') >= "2.34", + "stan::rng_t", "boost::ecuyer1988") if (utils::packageVersion('StanHeaders') >= "2.34") { cppcode <- gsub("boost::ecuyer1988", "stan::rng_t", cppcode, fixed = TRUE) } @@ -278,7 +280,7 @@ rstan_config <- function(pkgdir = ".") { header = paste0('#include "', hdr_name, '"'), module = paste0("stan_fit4", model_name, "_mod"), - CppClass = "rstan::stan_fit ", + CppClass = paste0("rstan::stan_fit "), Rfile = FALSE) ) })