I’m trying to use the exciting new feature of compiling a Stan model from an Rmarkdown chunk with cmdstanr using
When I try to compile interactively in RStudio, however, running the chunk results in the error:
R symbol not found
Strangely, it works fine when I render the file (e.g. with the “Knit” button in RStudio or via
rmarkdown::render()) rather than execute the chunk in an interactive session.
I’ve attached a .txt version of the .Rmd, and here is the output of
R version 4.0.2 (2020-06-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib locale:  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  cmdstanr_0.1.1 loaded via a namespace (and not attached):  digest_0.6.25 R6_2.4.1 jsonlite_1.7.0 backports_1.1.8 posterior_0.1.2 magrittr_1.5  evaluate_0.14 rlang_0.4.7 stringi_1.4.6 checkmate_2.0.0 rmarkdown_2.3 tools_4.0.2  stringr_1.4.0 glue_1.4.1 abind_1.4-5 parallel_4.0.2 xfun_0.16 yaml_2.2.1  compiler_4.0.2 base64enc_0.1-3 htmltools_0.5.0 knitr_1.29
Thanks for the new feature, and thanks for your help!
tst.txt (950 Bytes)