Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 24, 2025

Fix for deprecated aes_string() function

The function aes_string() has been deprecated in ggplot2 and needs to be replaced with the modern aes() syntax using the .data pronoun.

Completed Changes:

  • Located all instances of aes_string() usage (3 instances in R/buildPlot.r)
  • Analyzed the function parameters and data structure
  • Determined the appropriate replacement strategy
  • FIXED: Replaced aes_string(x=value, color="Model", shape="Model") with aes(x = .data[[value]], color = Model, shape = Model) on line 100
  • FIXED: Replaced aes_string(x=value, y=coefficient) with aes(x = .data[[value]], y = .data[[coefficient]]) on line 114
  • BONUS: Fixed related issue with quoted strings in aes() calls for geom_errorbarh (lines 85, 91)
  • Verified no other files contain aes_string() usage

Remaining Tasks:

  • Test the changes to ensure functionality is preserved
  • Update documentation if needed

Technical Details:

  • Used .data pronoun from rlang/dplyr for column name references from string parameters
  • Used direct unquoted column references for literal column names like "Model" → Model
  • Fixed related issues with incorrect quoted strings in existing aes() calls
  • Only the commented-out aes_string() call remains (line 113), which is inactive code

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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