diff --git a/rstan/example/examplemodel.R b/rstan/example/examplemodel.R index 3a2a509bf..141c2798e 100644 --- a/rstan/example/examplemodel.R +++ b/rstan/example/examplemodel.R @@ -1,5 +1,4 @@ -# create sysdata.rdat file for the example -# in rstan's doc +# create csv files for examples in rstan library(rstan) excode <- ' transformed data { @@ -27,6 +26,5 @@ excode <- ' ' exfit <- stan(model_code = excode, save_dso = FALSE, iter = 200, sample_file = "rstan_doc_ex.csv") -save(exfit, file = "../rstan/R/sysdata.rda", compress = "xz") plot(exfit) print(exfit) diff --git a/rstan/rstan/R/stanc.R b/rstan/rstan/R/stanc.R index 678a2cebd..fa4e32c64 100644 --- a/rstan/rstan/R/stanc.R +++ b/rstan/rstan/R/stanc.R @@ -21,7 +21,7 @@ stanc <- function(file, model_code = '', model_name = "anon_model", verbose = FA if (is.na(obfuscate_name)) obfuscate_name <- FALSE # model_name in C++, to avoid names that would be problematic in C++. model_cppname <- legitimate_model_name(model_name, obfuscate_name = obfuscate_name) - r <- .Call("CPP_stanc", model_code, model_cppname) + r <- .Call("CPP_stanc220", model_code, model_cppname) # from the cpp code of stanc, # returned is a named list with element 'status', 'model_cppname', and 'cppcode' r$model_name <- model_name diff --git a/rstan/rstan/src/init.cpp b/rstan/rstan/src/init.cpp index 821bf8063..7052a3bd4 100644 --- a/rstan/rstan/src/init.cpp +++ b/rstan/rstan/src/init.cpp @@ -23,7 +23,7 @@ SEXP seq_permutation(SEXP conf); SEXP CPP_read_comments(SEXP file, SEXP n); SEXP stan_prob_autocovariance(SEXP v); SEXP is_Null_NS(SEXP ns); -SEXP CPP_stanc(SEXP model_stancode, SEXP model_name); +SEXP CPP_stanc220(SEXP model_stancode, SEXP model_name); SEXP CPP_stan_version(); #ifdef __cplusplus } @@ -40,7 +40,7 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(CPP_read_comments, 2), CALLDEF(stan_prob_autocovariance, 1), CALLDEF(is_Null_NS, 1), - CALLDEF(CPP_stanc, 2), + CALLDEF(CPP_stanc220, 2), CALLDEF(CPP_stan_version, 0), {NULL, NULL, 0} }; diff --git a/rstan/rstan/src/stanc.cpp b/rstan/rstan/src/stanc.cpp index 56adc379e..9e7934736 100644 --- a/rstan/rstan/src/stanc.cpp +++ b/rstan/rstan/src/stanc.cpp @@ -12,7 +12,7 @@ #include #include -RcppExport SEXP CPP_stanc(SEXP model_stancode, SEXP model_name); +RcppExport SEXP CPP_stanc220(SEXP model_stancode, SEXP model_name); RcppExport SEXP CPP_stan_version(); SEXP CPP_stan_version() { @@ -28,7 +28,7 @@ SEXP CPP_stan_version() { END_RCPP } -SEXP CPP_stanc(SEXP model_stancode, SEXP model_name) { +SEXP CPP_stanc220(SEXP model_stancode, SEXP model_name) { BEGIN_RCPP; static const int SUCCESS_RC = 0; static const int EXCEPTION_RC = -1;