Skip to content

Fix dplyr::as_tibble and dplyr::tbl_df references to use tibble package#197

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-as-tibble-references
Draft

Fix dplyr::as_tibble and dplyr::tbl_df references to use tibble package#197
Copilot wants to merge 4 commits intomainfrom
copilot/fix-as-tibble-references

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

as_tibble() and tbl_df are exported from tibble, not dplyr. References to dplyr::as_tibble() still work via re-export but are incorrect, and [dplyr::tbl_df] roxygen links now resolve to dplyr:defunct.

Code

  • R/post_summ.R, R/Run_Mod.R: dplyr::as_tibble()tibble::as_tibble()

Documentation

  • R/Run_Mod.R, R/plot_predicted_curve.R, R/nepal_sees_jags_output.R, R/use_att_names.R: [dplyr::tbl_df][tibble::tbl_df] in roxygen2 comments

tibble was already in DESCRIPTION Imports; no dependency changes needed. R/as_case_data.R, R/sim_case_data.R, and R/postprocess_jags_output.R already used the correct tibble:: namespace.

Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 10:24
Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
….R and Run_Mod.R

Agent-Logs-Url: https://github.com/ucdavis/serodynamics/sessions/212b7544-cbf9-4137-a367-61fd31be832d

Co-authored-by: sschildhauer <165851188+sschildhauer@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 10:45
Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 10:47
Copilot AI changed the title [WIP] Fix dplyr tibble references for as_tibble Fix dplyr::as_tibble and dplyr::tbl_df references to use tibble package Apr 14, 2026
Copilot AI requested a review from sschildhauer April 14, 2026 10:49
Copy link
Copy Markdown
Collaborator

@sschildhauer sschildhauer left a comment

Choose a reason for hiding this comment

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

Looks good

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

📖 https://ucd-serg.github.io/serodynamics/preview/pr197
Preview documentation for this PR (at commit bd9a6b0)

Copy link
Copy Markdown
Collaborator

@sschildhauer sschildhauer left a comment

Choose a reason for hiding this comment

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

Looks good!

Copilot AI review requested due to automatic review settings April 21, 2026 10:43
Copy link
Copy Markdown
Contributor

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 cleans up namespace usage and documentation links by switching as_tibble() and tbl_df references from dplyr re-exports/defunct topics to the canonical tibble package, keeping the package’s code and docs aligned with current tidyverse exports.

Changes:

  • Updated code to call tibble::as_tibble() instead of dplyr::as_tibble() in key post-processing paths.
  • Updated roxygen links from [dplyr::tbl_df] to [tibble::tbl_df] (and regenerated .Rd output accordingly).
  • Bumped package development version and added a NEWS entry describing the change.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
R/post_summ.R Switches tibble conversion to tibble::as_tibble() for correct namespacing.
R/Run_Mod.R Switches tibble conversion to tibble::as_tibble() and updates roxygen link for sr_model return type.
R/plot_predicted_curve.R Updates roxygen link for dataset parameter type to tibble::tbl_df.
R/nepal_sees_jags_output.R Updates roxygen link in dataset format documentation to tibble::tbl_df.
R/use_att_names.R Updates roxygen link for run_mod() output type to tibble::tbl_df.
man/run_mod.Rd Regenerated docs reflecting tibble::tbl_df link target.
man/plot_predicted_curve.Rd Regenerated docs reflecting tibble::tbl_df link target.
man/nepal_sees_jags_output.Rd Regenerated docs reflecting tibble::tbl_df link target.
man/use_att_names.Rd Regenerated docs reflecting tibble::tbl_df link target.
NEWS.md Documents the namespace correction for as_tibble().
DESCRIPTION Bumps development version.

Comment thread R/Run_Mod.R
Comment on lines 183 to 185
# Making output a tibble and restructing.
jags_out <- dplyr::as_tibble(jags_out) |>
jags_out <- tibble::as_tibble(jags_out) |>
select(!c("Parameter")) |>
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

Line 183 has a typo ("restructing") and line 184 has extra spacing before the native pipe () |>), which makes the comment/code harder to read and may cause noisy diffs later. Consider correcting the comment (e.g., "restructuring") and normalizing spacing to a single space before |>.

Copilot uses AI. Check for mistakes.
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.

Fix dplyr tibble references for as_tibble

3 participants