Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdstanr depends R >= 4.1 #788

Closed
jsocolar opened this issue Jul 18, 2023 · 1 comment · Fixed by #789
Closed

cmdstanr depends R >= 4.1 #788

jsocolar opened this issue Jul 18, 2023 · 1 comment · Fixed by #789
Labels
bug Something isn't working

Comments

@jsocolar
Copy link
Contributor

If we try to install cmdstanr on old R versions, we get (here the code says jsocolar instead of stan-dev but I'm on a fresh pull of master)

> remotes::install_github("jsocolar/cmdstanr")
Downloading GitHub repo jsocolar/cmdstanr@HEAD
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpFkMY9G/remotes1b3f49de2ec6/jsocolar-cmdstanr-a787764/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
─  building ‘cmdstanr_0.5.3.tar.gz’
   
Installing package into ‘/home/ec2-user/R/x86_64-koji-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘cmdstanr’ ...
** using staged installation
** R
Error in parse(outFile) : 
  /tmp/RtmpkwuvBf/R.INSTALL52123e8a5d25/cmdstanr/R/fit.R:1450:23: unexpected input
1449:     log_lik_i_upars <- function(x, upars, i, parameter_name = "log_lik", ...) {
1450:       apply(upars, 1, \
                            ^
ERROR: unable to collate and parse R files for package ‘cmdstanr’
* removing ‘/home/ec2-user/R/x86_64-koji-linux-gnu-library/4.0/cmdstanr’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpFkMY9G/file1b3f7c22c84a/cmdstanr_0.5.3.tar.gz’ had non-zero exit status

To fix, we either need to revert from \ to function or we need to depend on R >= 4.1.0. Happy to make either fix depending on what you want.

@jsocolar jsocolar added the bug Something isn't working label Jul 18, 2023
@rok-cesnovar
Copy link
Member

Yeah, we need to revert from \ to function. Its not worth to bump the minimal R version just for this. Thanks for spotting this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants