Skip to content

Replace tidyselect::all_of with !! operator in dplyr::rename operations#4

Merged
MikkoVihtakari merged 3 commits intomasterfrom
copilot/fix-axis-label-issue
Feb 10, 2026
Merged

Replace tidyselect::all_of with !! operator in dplyr::rename operations#4
MikkoVihtakari merged 3 commits intomasterfrom
copilot/fix-axis-label-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Problem

Using tidyselect::all_of() with dplyr::rename() causes errors when datasets contain multiple columns with similar names (e.g., "length", "length_cm", "length_mm"). all_of() is designed for select() operations, not rename().

Changes

  • Replaced column selection syntax in all plotting functions:

    # Before
    dplyr::rename("length" = tidyselect::all_of(length))
    
    # After  
    dplyr::rename("length" = !!length)
  • Files modified: plot_growth.R, plot_lw.R, plot_maturity.R, plot_catchcurve.R

  • Removed tidyselect dependency from DESCRIPTION (no longer used)

Technical Notes

The !! operator properly unquotes character string variables in tidy evaluation contexts. Already available via dplyr's rlang dependency—no new dependencies required.

Original prompt

Could you suggest how to fix this issue: #1


💡 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.

Copilot AI and others added 2 commits February 10, 2026 08:44
Co-authored-by: MikkoVihtakari <4095204+MikkoVihtakari@users.noreply.github.com>
Co-authored-by: MikkoVihtakari <4095204+MikkoVihtakari@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix axis label issue in ggFishPlots Replace tidyselect::all_of with !! operator in dplyr::rename operations Feb 10, 2026
Copilot AI requested a review from MikkoVihtakari February 10, 2026 08:49
@MikkoVihtakari MikkoVihtakari marked this pull request as ready for review February 10, 2026 09:02
@MikkoVihtakari MikkoVihtakari merged commit 01ed697 into master Feb 10, 2026
5 checks passed
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