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

Set Minimum R version 4.1 #7

Open
wildintellect opened this issue Jan 24, 2024 · 0 comments
Open

Set Minimum R version 4.1 #7

wildintellect opened this issue Jan 24, 2024 · 0 comments

Comments

@wildintellect
Copy link

wildintellect commented Jan 24, 2024

Best Practice for packaging, in DESCRIPTION to set the minimum R version to save some users some headaches, and noise on this repo. The minimum R version is 4.1 because the native pipe operator |> is being used. This is low priority, since the solution is for people to upgrade their R version.
https://www.tidyverse.org/blog/2023/04/base-vs-magrittr-pipe/

Fix - add to DESCRIPTION
Depends: R (>= 4.1.0)

Example of a fail right now

> install.packages("earthdatalogin")
installing the source package 'earthdatalogin'
trying URL 'https://cran.rstudio.com/src/contrib/earthdatalogin_0.0.2.tar.gz'
Content type 'application/x-gzip' length 3933626 bytes (3.8 MB)
==================================================
downloaded 3.8 MB
* installing *source* package 'earthdatalogin' ...
** package 'earthdatalogin' successfully unpacked and MD5 sums checked
** using staged installation
** R
Error in parse(outFile) : 
  /private/var/folders/w1/qqx4j1295c1b48y9dyzz51t00000gn/T/RtmpZr8yhq/R.INSTALL4e9347113370/earthdatalogin/R/edl_set_token.R:189:47: unexpected '>'
188: edl_stac_urls <- function(items, assets = "data") {
189:   purrr::map(items$features, list("assets")) |>
                                                  ^
ERROR: unable to collate and parse R files for package 'earthdatalogin'
* removing '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/earthdatalogin'
Warning in install.packages :
  installation of package 'earthdatalogin' had non-zero exit status
The downloaded source packages are in
	'/private/var/folders/w1/qqx4j1295c1b48y9dyzz51t00000gn/T/RtmpHUryoF/downloaded_packages'
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

No branches or pull requests

1 participant