From 5f3d7eb641c3d2080996c560099022b275cf5495 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:24:50 +0000 Subject: [PATCH 1/8] Initial plan From 9ef2ff2044034211b932f3332859dcca866fef3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:44:58 +0000 Subject: [PATCH 2/8] fix: replace dplyr::as_tibble() with tibble::as_tibble() in post_summ.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> --- DESCRIPTION | 2 +- NEWS.md | 1 + R/Run_Mod.R | 2 +- R/post_summ.R | 2 +- man/nepal_sees_jags_output.Rd | 2 +- man/plot_predicted_curve.Rd | 2 +- man/run_mod.Rd | 2 +- man/use_att_names.Rd | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ea5d92de0..a46b14176 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: serodynamics Title: What the Package Does (One Line, Title Case) -Version: 0.0.0.9047 +Version: 0.0.0.9048 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."), diff --git a/NEWS.md b/NEWS.md index 89199522a..701ff3762 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # serodynamics (development version) +* Fixed `dplyr::as_tibble()` references to `tibble::as_tibble()` in `post_summ()` and `run_mod()`, since `as_tibble()` is exported from the `tibble` package, not `dplyr`. * Added dev container configuration for persistent, cached development environment that includes R, JAGS, and all dependencies preinstalled, making Copilot Workspace sessions much faster. diff --git a/R/Run_Mod.R b/R/Run_Mod.R index 25e75d601..24716def7 100644 --- a/R/Run_Mod.R +++ b/R/Run_Mod.R @@ -181,7 +181,7 @@ run_mod <- function(data, # jags output results for each stratification rbinded. # Making output a tibble and restructing. - jags_out <- dplyr::as_tibble(jags_out) |> + jags_out <- tibble::as_tibble(jags_out) |> select(!c("Parameter")) |> rename("Parameter" = "Parameter_sub") jags_out <- jags_out[, c("Iteration", "Chain", "Parameter", "Iso_type", diff --git a/R/post_summ.R b/R/post_summ.R index 011adc358..6fc66fbea 100644 --- a/R/post_summ.R +++ b/R/post_summ.R @@ -55,5 +55,5 @@ post_summ <- function(data, `50.0%` = quantile(.data$value, 0.50), `75.0%` = quantile(.data$value, 0.75), `97.5%` = quantile(.data$value, 0.975)) - dplyr::as_tibble(summarize_jags) + tibble::as_tibble(summarize_jags) } diff --git a/man/nepal_sees_jags_output.Rd b/man/nepal_sees_jags_output.Rd index 2bd139153..4ea195d17 100644 --- a/man/nepal_sees_jags_output.Rd +++ b/man/nepal_sees_jags_output.Rd @@ -5,7 +5,7 @@ \alias{nepal_sees_jags_output} \title{SEES Typhoid run_mod jags output} \format{ -An S3 object of class \code{sr_model}: A \link[dplyr:tbl_df]{dplyr::tbl_df} that contains the +An S3 object of class \code{sr_model}: A \link[dplyr:defunct]{dplyr::tbl_df} that contains the posterior predictive distribution of the person-specific parameters for a "new person" with no observed data (\code{Subject = "newperson"}) and posterior distributions of the person-specific parameters for two arbitrarily-chosen diff --git a/man/plot_predicted_curve.Rd b/man/plot_predicted_curve.Rd index 7e2fabde6..b5638b881 100644 --- a/man/plot_predicted_curve.Rd +++ b/man/plot_predicted_curve.Rd @@ -31,7 +31,7 @@ samples from the posterior distribution of the model parameters.} \item{antigen_iso}{The antigen isotype to plot; for example, "HlyE_IgA" or "HlyE_IgG".} -\item{dataset}{(Optional) A \link[dplyr:tbl_df]{dplyr::tbl_df} with observed antibody response +\item{dataset}{(Optional) A \link[dplyr:defunct]{dplyr::tbl_df} with observed antibody response data. Must contain: \itemize{ diff --git a/man/run_mod.Rd b/man/run_mod.Rd index 08f914275..585210ae0 100644 --- a/man/run_mod.Rd +++ b/man/run_mod.Rd @@ -93,7 +93,7 @@ If specified, must be 2 values long: }} } \value{ -An \code{sr_model} class object: a subclass of \link[dplyr:tbl_df]{dplyr::tbl_df} that +An \code{sr_model} class object: a subclass of \link[dplyr:defunct]{dplyr::tbl_df} that contains MCMC samples from the joint posterior distribution of the model parameters, conditional on the provided input \code{data}, including the following: diff --git a/man/use_att_names.Rd b/man/use_att_names.Rd index f43fcef0c..9a2151e0e 100644 --- a/man/use_att_names.Rd +++ b/man/use_att_names.Rd @@ -16,7 +16,7 @@ The input \link{data.frame} with columns named after attributes. \description{ \code{use_att_names} takes prepared longitudinal data for antibody kinetic modeling and names columns using attribute values to allow merging -with a modeled \code{\link[=run_mod]{run_mod()}} output \link[dplyr:tbl_df]{dplyr::tbl_df}. The column names include +with a modeled \code{\link[=run_mod]{run_mod()}} output \link[dplyr:defunct]{dplyr::tbl_df}. The column names include \code{Subject}, \code{Iso_type}, \code{t}, and \code{result}. } \keyword{internal} From 13be065d9b78dcd27ef9627493580e8e7464190e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:47:18 +0000 Subject: [PATCH 3/8] fix: replace dplyr::tbl_df with tibble::tbl_df in roxygen2 documentation Agent-Logs-Url: https://github.com/ucdavis/serodynamics/sessions/212b7544-cbf9-4137-a367-61fd31be832d Co-authored-by: sschildhauer <165851188+sschildhauer@users.noreply.github.com> --- R/Run_Mod.R | 2 +- R/nepal_sees_jags_output.R | 2 +- R/plot_predicted_curve.R | 2 +- R/use_att_names.R | 2 +- man/nepal_sees_jags_output.Rd | 2 +- man/plot_predicted_curve.Rd | 2 +- man/run_mod.Rd | 2 +- man/use_att_names.Rd | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/Run_Mod.R b/R/Run_Mod.R index 24716def7..d0a7d85eb 100644 --- a/R/Run_Mod.R +++ b/R/Run_Mod.R @@ -26,7 +26,7 @@ #' should be included as an element of the [list] object returned by `run_mod()` #' (see `Value` section below for details). #' Note: These objects can be large. -#' @returns An `sr_model` class object: a subclass of [dplyr::tbl_df] that +#' @returns An `sr_model` class object: a subclass of [tibble::tbl_df] that #' contains MCMC samples from the joint posterior distribution of the model #' parameters, conditional on the provided input `data`, #' including the following: diff --git a/R/nepal_sees_jags_output.R b/R/nepal_sees_jags_output.R index fb75a06c7..5336744d2 100644 --- a/R/nepal_sees_jags_output.R +++ b/R/nepal_sees_jags_output.R @@ -8,7 +8,7 @@ #' which is the diagnosis type (typhoid or #' paratyphoid). Keeping only IDs `"newperson"`, `"sees_npl_1"`, `"sees_npl_2"`. #' -#' @format An S3 object of class `sr_model`: A [dplyr::tbl_df] that contains the +#' @format An S3 object of class `sr_model`: A [tibble::tbl_df] that contains the #' posterior predictive distribution of the person-specific parameters for a #' "new person" with no observed data (`Subject = "newperson"`) and posterior #' distributions of the person-specific parameters for two arbitrarily-chosen diff --git a/R/plot_predicted_curve.R b/R/plot_predicted_curve.R index 3a0d46545..f1cb1bff1 100644 --- a/R/plot_predicted_curve.R +++ b/R/plot_predicted_curve.R @@ -12,7 +12,7 @@ #' @param ids The participant IDs to plot; for example, `"sees_npl_128"`. #' @param antigen_iso The antigen isotype to plot; for example, "HlyE_IgA" or #' "HlyE_IgG". -#' @param dataset (Optional) A [dplyr::tbl_df] with observed antibody response +#' @param dataset (Optional) A [tibble::tbl_df] with observed antibody response #' data. #' Must contain: #' - `timeindays` diff --git a/R/use_att_names.R b/R/use_att_names.R index b72128587..02a40618c 100644 --- a/R/use_att_names.R +++ b/R/use_att_names.R @@ -2,7 +2,7 @@ #' @description #' `use_att_names` takes prepared longitudinal data for antibody kinetic #' modeling and names columns using attribute values to allow merging -#' with a modeled [run_mod()] output [dplyr::tbl_df]. The column names include +#' with a modeled [run_mod()] output [tibble::tbl_df]. The column names include #' `Subject`, `Iso_type`, `t`, and `result`. #' @param data A [data.frame] raw longitudinal data that has been #' prepared for antibody kinetic modeling using [as_case_data()]. diff --git a/man/nepal_sees_jags_output.Rd b/man/nepal_sees_jags_output.Rd index 4ea195d17..2265c435c 100644 --- a/man/nepal_sees_jags_output.Rd +++ b/man/nepal_sees_jags_output.Rd @@ -5,7 +5,7 @@ \alias{nepal_sees_jags_output} \title{SEES Typhoid run_mod jags output} \format{ -An S3 object of class \code{sr_model}: A \link[dplyr:defunct]{dplyr::tbl_df} that contains the +An S3 object of class \code{sr_model}: A \link[tibble:tbl_df-class]{tibble::tbl_df} that contains the posterior predictive distribution of the person-specific parameters for a "new person" with no observed data (\code{Subject = "newperson"}) and posterior distributions of the person-specific parameters for two arbitrarily-chosen diff --git a/man/plot_predicted_curve.Rd b/man/plot_predicted_curve.Rd index b5638b881..194ba11f4 100644 --- a/man/plot_predicted_curve.Rd +++ b/man/plot_predicted_curve.Rd @@ -31,7 +31,7 @@ samples from the posterior distribution of the model parameters.} \item{antigen_iso}{The antigen isotype to plot; for example, "HlyE_IgA" or "HlyE_IgG".} -\item{dataset}{(Optional) A \link[dplyr:defunct]{dplyr::tbl_df} with observed antibody response +\item{dataset}{(Optional) A \link[tibble:tbl_df-class]{tibble::tbl_df} with observed antibody response data. Must contain: \itemize{ diff --git a/man/run_mod.Rd b/man/run_mod.Rd index 585210ae0..a3aec9cd6 100644 --- a/man/run_mod.Rd +++ b/man/run_mod.Rd @@ -93,7 +93,7 @@ If specified, must be 2 values long: }} } \value{ -An \code{sr_model} class object: a subclass of \link[dplyr:defunct]{dplyr::tbl_df} that +An \code{sr_model} class object: a subclass of \link[tibble:tbl_df-class]{tibble::tbl_df} that contains MCMC samples from the joint posterior distribution of the model parameters, conditional on the provided input \code{data}, including the following: diff --git a/man/use_att_names.Rd b/man/use_att_names.Rd index 9a2151e0e..144aa5a81 100644 --- a/man/use_att_names.Rd +++ b/man/use_att_names.Rd @@ -16,7 +16,7 @@ The input \link{data.frame} with columns named after attributes. \description{ \code{use_att_names} takes prepared longitudinal data for antibody kinetic modeling and names columns using attribute values to allow merging -with a modeled \code{\link[=run_mod]{run_mod()}} output \link[dplyr:defunct]{dplyr::tbl_df}. The column names include +with a modeled \code{\link[=run_mod]{run_mod()}} output \link[tibble:tbl_df-class]{tibble::tbl_df}. The column names include \code{Subject}, \code{Iso_type}, \code{t}, and \code{result}. } \keyword{internal} From bd9a6b0c64fb27a87edd9c006fdaaf57a06eb6ca Mon Sep 17 00:00:00 2001 From: sschildhauer Date: Tue, 21 Apr 2026 17:42:35 +0700 Subject: [PATCH 4/8] Fixing lint --- R/nepal_sees_jags_output.R | 12 ++++++------ man/nepal_sees_jags_output.Rd | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/nepal_sees_jags_output.R b/R/nepal_sees_jags_output.R index 5336744d2..e7af893e8 100644 --- a/R/nepal_sees_jags_output.R +++ b/R/nepal_sees_jags_output.R @@ -8,12 +8,12 @@ #' which is the diagnosis type (typhoid or #' paratyphoid). Keeping only IDs `"newperson"`, `"sees_npl_1"`, `"sees_npl_2"`. #' -#' @format An S3 object of class `sr_model`: A [tibble::tbl_df] that contains the -#' posterior predictive distribution of the person-specific parameters for a -#' "new person" with no observed data (`Subject = "newperson"`) and posterior -#' distributions of the person-specific parameters for two arbitrarily-chosen -#' subjects (`"sees_npl_1"` and `"sees_npl_2"`). -#' Contains 40,000 `rows`, 7 `columns`, and model `attributes`. +#' @format An S3 object of class `sr_model`: A [tibble::tbl_df] that contains +#' the posterior predictive distribution of the person-specific parameters for +#' a "new person" with no observed data (`Subject = "newperson"`) and posterior +#' distributions of the person-specific parameters for two arbitrarily-chosen +#' subjects (`"sees_npl_1"` and `"sees_npl_2"`). +#' Contains 40,000 `rows`, 7 `columns`, and model `attributes`. #' \describe{ #' \item{Iteration}{Number of sampling iterations: 500 iterations} #' \item{Chain}{Number of MCMC chains run: 2 chains run} diff --git a/man/nepal_sees_jags_output.Rd b/man/nepal_sees_jags_output.Rd index 2265c435c..1407cf267 100644 --- a/man/nepal_sees_jags_output.Rd +++ b/man/nepal_sees_jags_output.Rd @@ -5,9 +5,9 @@ \alias{nepal_sees_jags_output} \title{SEES Typhoid run_mod jags output} \format{ -An S3 object of class \code{sr_model}: A \link[tibble:tbl_df-class]{tibble::tbl_df} that contains the -posterior predictive distribution of the person-specific parameters for a -"new person" with no observed data (\code{Subject = "newperson"}) and posterior +An S3 object of class \code{sr_model}: A \link[tibble:tbl_df-class]{tibble::tbl_df} that contains +the posterior predictive distribution of the person-specific parameters for +a "new person" with no observed data (\code{Subject = "newperson"}) and posterior distributions of the person-specific parameters for two arbitrarily-chosen subjects (\code{"sees_npl_1"} and \code{"sees_npl_2"}). Contains 40,000 \code{rows}, 7 \code{columns}, and model \code{attributes}. From 9da7b782d0336c91a8421eb20e33a7e01a9b1a07 Mon Sep 17 00:00:00 2001 From: Samuel Hisaji Schildhauer <165851188+sschildhauer@users.noreply.github.com> Date: Tue, 5 May 2026 16:54:36 -0700 Subject: [PATCH 5/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- R/Run_Mod.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Run_Mod.R b/R/Run_Mod.R index d0a7d85eb..f638d5831 100644 --- a/R/Run_Mod.R +++ b/R/Run_Mod.R @@ -181,7 +181,7 @@ run_mod <- function(data, # jags output results for each stratification rbinded. # Making output a tibble and restructing. - jags_out <- tibble::as_tibble(jags_out) |> + jags_out <- tibble::as_tibble(jags_out) |> select(!c("Parameter")) |> rename("Parameter" = "Parameter_sub") jags_out <- jags_out[, c("Iteration", "Chain", "Parameter", "Iso_type", From 956a72fb10942753e2fc3ae839e5f10121670c79 Mon Sep 17 00:00:00 2001 From: sschildhauer Date: Tue, 5 May 2026 16:58:10 -0700 Subject: [PATCH 6/8] Fixing spelling of restructuring --- R/Run_Mod.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/Run_Mod.R b/R/Run_Mod.R index f638d5831..bedfa7fd5 100644 --- a/R/Run_Mod.R +++ b/R/Run_Mod.R @@ -180,7 +180,7 @@ run_mod <- function(data, # Outputting the finalized jags output as a data frame with the # jags output results for each stratification rbinded. - # Making output a tibble and restructing. + # Making output a tibble and restructuring. jags_out <- tibble::as_tibble(jags_out) |> select(!c("Parameter")) |> rename("Parameter" = "Parameter_sub") From 5f9f006bbb9451e76375296855abeb5bd806d330 Mon Sep 17 00:00:00 2001 From: sschildhauer Date: Wed, 6 May 2026 16:17:24 -0700 Subject: [PATCH 7/8] Updating documentation for the tibble change --- man/nepal_sees_jags_output.Rd | 2 +- man/plot_predicted_curve.Rd | 2 +- man/run_mod.Rd | 2 +- man/use_att_names.Rd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/nepal_sees_jags_output.Rd b/man/nepal_sees_jags_output.Rd index 1407cf267..1f0e7bcf6 100644 --- a/man/nepal_sees_jags_output.Rd +++ b/man/nepal_sees_jags_output.Rd @@ -5,7 +5,7 @@ \alias{nepal_sees_jags_output} \title{SEES Typhoid run_mod jags output} \format{ -An S3 object of class \code{sr_model}: A \link[tibble:tbl_df-class]{tibble::tbl_df} that contains +An S3 object of class \code{sr_model}: A \link[tibble:tbl_df]{tibble::tbl_df} that contains the posterior predictive distribution of the person-specific parameters for a "new person" with no observed data (\code{Subject = "newperson"}) and posterior distributions of the person-specific parameters for two arbitrarily-chosen diff --git a/man/plot_predicted_curve.Rd b/man/plot_predicted_curve.Rd index 194ba11f4..088056ee9 100644 --- a/man/plot_predicted_curve.Rd +++ b/man/plot_predicted_curve.Rd @@ -31,7 +31,7 @@ samples from the posterior distribution of the model parameters.} \item{antigen_iso}{The antigen isotype to plot; for example, "HlyE_IgA" or "HlyE_IgG".} -\item{dataset}{(Optional) A \link[tibble:tbl_df-class]{tibble::tbl_df} with observed antibody response +\item{dataset}{(Optional) A \link[tibble:tbl_df]{tibble::tbl_df} with observed antibody response data. Must contain: \itemize{ diff --git a/man/run_mod.Rd b/man/run_mod.Rd index efb7199c7..b35d4977b 100644 --- a/man/run_mod.Rd +++ b/man/run_mod.Rd @@ -93,7 +93,7 @@ If specified, must be 2 values long: }} } \value{ -An \code{sr_model} class object: a subclass of \link[tibble:tbl_df-class]{tibble::tbl_df} that +An \code{sr_model} class object: a subclass of \link[tibble:tbl_df]{tibble::tbl_df} that contains MCMC samples from the joint posterior distribution of the model parameters, conditional on the provided input \code{data}, including the following: diff --git a/man/use_att_names.Rd b/man/use_att_names.Rd index 144aa5a81..95db5a471 100644 --- a/man/use_att_names.Rd +++ b/man/use_att_names.Rd @@ -16,7 +16,7 @@ The input \link{data.frame} with columns named after attributes. \description{ \code{use_att_names} takes prepared longitudinal data for antibody kinetic modeling and names columns using attribute values to allow merging -with a modeled \code{\link[=run_mod]{run_mod()}} output \link[tibble:tbl_df-class]{tibble::tbl_df}. The column names include +with a modeled \code{\link[=run_mod]{run_mod()}} output \link[tibble:tbl_df]{tibble::tbl_df}. The column names include \code{Subject}, \code{Iso_type}, \code{t}, and \code{result}. } \keyword{internal} From 28f3e83941cc046c0a2872e57fa97560ded61228 Mon Sep 17 00:00:00 2001 From: sschildhauer Date: Wed, 6 May 2026 16:17:35 -0700 Subject: [PATCH 8/8] Increment version number to 0.0.0.9049 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 84fdadece..763ffa767 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: serodynamics Title: What the Package Does (One Line, Title Case) -Version: 0.0.0.9048 +Version: 0.0.0.9049 Authors@R: c( person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"), comment = "Author of the method and original code."),