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

Avoid native pipe check note or build warning on R >= 4.5.0 #503

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

nanxstats
Copy link
Collaborator

This PR fixes the R CMD check note or R CMD build warning on r-devel (upcoming R 4.5.0) where |> is used in functions under R/, by replacing the native pipe with the magrittr pipe.

This check note is currently shown on all r-devel CRAN builds:

Version: 1.1.3
Check: DESCRIPTION meta-information
Result: NOTE
    Missing dependency on R >= 4.1.0 because package code uses the pipe
    |> or function shorthand \(...) syntax added in R 4.1.0.
    File(s) using such syntax:
      ‘expected_time.R’ ‘gs_info_ahr.R’
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc,
         r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc,
         r-devel-macos-x86_64, r-devel-windows-x86_64

Without this fix, for new source tarballs built by R 4.5.0, this becomes a build warning, since R CMD build will auto-bump the R >= 3.5.0 requirement in DESCRIPTION in the tarball.

Copy link
Collaborator

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. We're already importing %>% from {dplyr}, so we may as well use it so that we don't have to bump the minimum required R version. Thanks @nanxstats!

importFrom(dplyr,"%>%")

R (>= 3.5.0)

Copy link
Collaborator

@LittleBeannie LittleBeannie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @nanxstats

@LittleBeannie LittleBeannie merged commit 33af554 into main Feb 27, 2025
7 checks passed
@LittleBeannie LittleBeannie deleted the pipe-note branch February 27, 2025 16:02
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