refactor: Replace deprecated mutate_at/vars with across() (M11)#160
Open
refactor: Replace deprecated mutate_at/vars with across() (M11)#160
Conversation
…n daily checks on macos-latest
Replace deprecated dplyr functions in list_cansim_cubes():
- mutate_at(vars(ends_with("Date")), ...) → mutate(across(ends_with("Date"), ...))
- mutate_at(vars(matches("releaseTime")), ...) → mutate(across(matches("releaseTime"), ...))
This addresses deprecation warnings from dplyr 1.0.4+.
Note: Other API consistency items from the audit plan (H11, H12, M12, M13, M14)
are deferred as they require coauthor discussion:
- H11: Standardizing language parameter defaults could break existing code
- H12: Adding parameter validation could reject previously accepted input
- M12: Standardizing refresh parameter semantics needs design discussion
- M13: Documentation appears to be already aligned with code after review
- M14: Extracting language constants is a larger refactoring effort
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Replace deprecated dplyr functions with their modern equivalents.
Changes
M11: Replace deprecated mutate_at/vars with across()
Location:
list_cansim_cubes()inR/cansim_tables_list.RThis addresses deprecation warnings when using dplyr 1.0.4+.
Deferred Items
The following items from the audit plan require coauthor discussion before implementation:
H11: Standardize language parameter defaults
language="english"(most), others uselanguage="en"cleaned_ndm_language(), so behavior is identicalH12: Add parameter validation
M12: Standardize refresh parameter
get_cansim()uses logical,get_cansim_connection()uses "auto"/TRUE/FALSEM13: default_month documentation
M14: Extract language constants
Files Modified
R/cansim_tables_list.R:list_cansim_cubes()functionTest plan
devtools::check()passes (0 errors, 0 warnings)Related Issues
Addresses code quality item from code audit plan. See #150-153 for discussion items requiring coauthor input.
🤖 Generated with Claude Code