Refactor superseded dplyr syntax to current best practices #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR comprehensively updates all superseded dplyr syntax throughout the codebase to align with modern dplyr best practices (post dplyr 1.0.0).
Changes Made
Superseded Function Replacements
mutate_at()→mutate(across()): Updated 8 instances across 6 filessummarise_at()→summarise(across()): Updated 17 instances across 11 filesselect_if()→select(where()): Updated 4 instances in 1 fileFiles Updated (18 total)
R/prep_query.R- Date column conversionR/network_g2g.R- Group collaboration metricsR/collaboration_area.R- Area chart data processingR/create_bubble.R- Bubble plot metrics aggregationR/create_line.R- Line chart data summarizationR/create_line_asis.R- Date formattingR/create_period_scatter.R- Period comparison metricsR/create_scatter.R- Scatter plot data processingR/create_stacked.R- Stacked chart metricsR/flag_ch_ratio.R- Collaboration hours validationR/flag_em_ratio.R- Email metrics validationR/flag_extreme.R- Outlier detectionR/flag_outlooktime.R- Outlook time processingR/hrvar_count_all.R- HR variable analysisR/identify_outlier.R- Statistical outlier identificationR/keymetrics_scan.R- Key metrics scanningR/p2p_data_sim.R- Person-to-person data simulationR/extract_hr.R- HR variable extractionExamples of Updates
Before (superseded):
After (current best practice):
Benefits
Testing
Fixes #50.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cloud.r-project.org/usr/lib/R/bin/exec/R -e install.packages(c('devtools',~+~'testthat',~+~'dplyr',~+~'tidyselect'))(dns block)cran.rstudio.com/usr/lib/R/bin/exec/R -e install.packages(c('devtools',~+~'testthat',~+~'dplyr',~+~'tidyselect'),~+~repos='REDACTED')(dns block)esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.