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

Update divide.R #1707

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Update divide.R #1707

merged 1 commit into from
Jan 15, 2025

Conversation

brownag
Copy link
Contributor

@brownag brownag commented Jan 14, 2025

I am all for the lambda function syntax, but we still run tests on R 3.6.3 (we probably will continue to do this until at least Ubuntu 20.04 end of support in April 2025), and terra min R version is still 3.5.0.

The package fails to parse on R 3.6.3 with \(x) ... style syntax:

...
  Error in parse(outFile) : 
    /tmp/RtmpugU74t/R.INSTALL2be073be0aac/terra/R/divide.R:86:75: unexpected input
  85:                                         if (n[i] == 1) {
  86:                                                 out <- unlist(lapply(out, \
                                                                                ^
  ERROR: unable to collate and parse R files for package ‘terra’
...

- fix for build failure on R 3.6.3
@rhijmans rhijmans merged commit bf792ff into rspatial:master Jan 15, 2025
4 checks passed
@rhijmans
Copy link
Member

Sorry, I try to avoid these, but they slip in.

@brownag
Copy link
Contributor Author

brownag commented Jan 15, 2025

Thank you!

@kadyb
Copy link
Contributor

kadyb commented Jan 22, 2025

It seems that in the future R CMD CHECK will check if a package uses lambda function without defining R version >= 4.1.

https://stat.ethz.ch/pipermail/r-devel/2025-January/083793.html

brownag added a commit to brownag/terra that referenced this pull request Jan 22, 2025
It appears I missed this `|>` in rspatial#1707
@brownag brownag mentioned this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants