Skip to content

use newer syntax#1031

Open
IndrajeetPatil wants to merge 3 commits intomainfrom
modernize-new-syntax
Open

use newer syntax#1031
IndrajeetPatil wants to merge 3 commits intomainfrom
modernize-new-syntax

Conversation

@IndrajeetPatil
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 11:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes R syntax throughout the codebase by adopting newer language features introduced in R 4.1.0+ and contemporary dplyr patterns.

Key Changes:

  • Replaced function(x) with anonymous function shorthand \(x) syntax
  • Modernized dplyr code from group_by() %>% tally() %>% ungroup() to summarise(.by = ...) pattern
  • Replaced isFALSE() with ! operator for logical negation
  • Changed ifelse() to if-else for scalar conditional assignments
  • Updated GitHub Actions workflow for code coverage with better configuration

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
R/utils.R Updated error handler to use anonymous function shorthand \(e)
R/ggpiestats.R Changed isFALSE(paired) to !paired in condition
R/ggpiestats-ggbarstats-helpers.R Modernized .cat_counter to use .by parameter; updated .chisq_test_safe with new syntax and parameter handling
R/gghistostats.R Updated labels parameter to use anonymous function shorthand
R/ggbetweenstats-helpers.R Changed .f_switch from vectorized ifelse() to scalar if-else
R/ggbarstats.R Changed isFALSE(paired) to !paired in condition
R/extract-stats.R Converted multiple function definitions to anonymous function shorthand
.github/workflows/test-coverage.yaml Enhanced workflow with explicit permissions, updated runner, improved coverage reporting, and artifact upload

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants