Problem installing cmdstanr on mac

I cannot install CmdStanR on my mac. I have the latest versions of EVERYTHING, have re-installed, etc.

I used two different codes:

install.packages(“cmdstanr”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))



This is the error message for the above (similar to the previous code’s error message):

── R CMD build ──────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T/RtmpAOnJ4L/remotesad5157fe563/stan-dev-cmdstanr-ab30e07/DESCRIPTION’ …
─ preparing ‘cmdstanr’:
✔ checking DESCRIPTION meta-information …
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Omitted ‘LazyData’ from DESCRIPTION
─ building ‘cmdstanr_0.5.3.tar.gz’

Error: 3:49: unexpected string constant
3: if (Sys.getenv(“RSTUDIO”) == “1” && RSTUDIO_TERM")) &&
Execution halted
Warning: installation of package ‘/var/folders/66/6yy31gvd2ggdrcmn0v72j0z40000gn/T//RtmpAOnJ4L/filead52c97a314/cmdstanr_0.5.3.tar.gz’ had non-zero exit status

Please provide this additional information in addition to your question:

  • Operating System: Ventura 13.3.1
    latest R, RStudio versions, C++ compiler working fine