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/4] 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/4] 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 ea5d92de..a46b1417 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 89199522..701ff376 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 25e75d60..24716def 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 011adc35..6fc66fbe 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 2bd13915..4ea195d1 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 7e2fabde..b5638b88 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 08f91427..585210ae 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 f43fcef0..9a2151e0 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/4] 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 24716def..d0a7d85e 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 fb75a06c..5336744d 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 3a0d4654..f1cb1bff 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 b7212858..02a40618 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 4ea195d1..2265c435 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 b5638b88..194ba11f 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 585210ae..a3aec9cd 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 9a2151e0..144aa5a8 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/4] 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 5336744d..e7af893e 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 2265c435..1407cf26 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}.