Skip to content

Commit 305470e

Browse files
authored
Merge pull request #197 from ucdavis/copilot/fix-as-tibble-references
Fix dplyr::as_tibble and dplyr::tbl_df references to use tibble package
2 parents 144cdd6 + 28f3e83 commit 305470e

11 files changed

Lines changed: 20 additions & 20 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: serodynamics
22
Title: What the Package Does (One Line, Title Case)
3-
Version: 0.0.0.9048
3+
Version: 0.0.0.9049
44
Authors@R: c(
55
person("Peter", "Teunis", , "p.teunis@emory.edu", role = c("aut", "cph"),
66
comment = "Author of the method and original code."),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# serodynamics (development version)
22

3+
* 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`.
34
* Added R 4.5+ snapshot variants to handle the changed attribute ordering in
45
`as_case_data()`, ensuring test suite compatibility with R 4.5 and later (#109).
5-
66
* Added dev container configuration for persistent, cached development environment
77
that includes R, JAGS, and all dependencies preinstalled, making Copilot
88
Workspace sessions much faster.

R/Run_Mod.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#' should be included as an element of the [list] object returned by `run_mod()`
2727
#' (see `Value` section below for details).
2828
#' Note: These objects can be large.
29-
#' @returns An `sr_model` class object: a subclass of [dplyr::tbl_df] that
29+
#' @returns An `sr_model` class object: a subclass of [tibble::tbl_df] that
3030
#' contains MCMC samples from the joint posterior distribution of the model
3131
#' parameters, conditional on the provided input `data`,
3232
#' including the following:
@@ -180,8 +180,8 @@ run_mod <- function(data,
180180
# Outputting the finalized jags output as a data frame with the
181181
# jags output results for each stratification rbinded.
182182

183-
# Making output a tibble and restructing.
184-
jags_out <- dplyr::as_tibble(jags_out) |>
183+
# Making output a tibble and restructuring.
184+
jags_out <- tibble::as_tibble(jags_out) |>
185185
select(!c("Parameter")) |>
186186
rename("Parameter" = "Parameter_sub")
187187
jags_out <- jags_out[, c("Iteration", "Chain", "Parameter", "Iso_type",

R/nepal_sees_jags_output.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#' which is the diagnosis type (typhoid or
99
#' paratyphoid). Keeping only IDs `"newperson"`, `"sees_npl_1"`, `"sees_npl_2"`.
1010
#'
11-
#' @format An S3 object of class `sr_model`: A [dplyr::tbl_df] that contains the
12-
#' posterior predictive distribution of the person-specific parameters for a
13-
#' "new person" with no observed data (`Subject = "newperson"`) and posterior
14-
#' distributions of the person-specific parameters for two arbitrarily-chosen
15-
#' subjects (`"sees_npl_1"` and `"sees_npl_2"`).
16-
#' Contains 40,000 `rows`, 7 `columns`, and model `attributes`.
11+
#' @format An S3 object of class `sr_model`: A [tibble::tbl_df] that contains
12+
#' the posterior predictive distribution of the person-specific parameters for
13+
#' a "new person" with no observed data (`Subject = "newperson"`) and posterior
14+
#' distributions of the person-specific parameters for two arbitrarily-chosen
15+
#' subjects (`"sees_npl_1"` and `"sees_npl_2"`).
16+
#' Contains 40,000 `rows`, 7 `columns`, and model `attributes`.
1717
#' \describe{
1818
#' \item{Iteration}{Number of sampling iterations: 500 iterations}
1919
#' \item{Chain}{Number of MCMC chains run: 2 chains run}

R/plot_predicted_curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @param ids The participant IDs to plot; for example, `"sees_npl_128"`.
1313
#' @param antigen_iso The antigen isotype to plot; for example, "HlyE_IgA" or
1414
#' "HlyE_IgG".
15-
#' @param dataset (Optional) A [dplyr::tbl_df] with observed antibody response
15+
#' @param dataset (Optional) A [tibble::tbl_df] with observed antibody response
1616
#' data.
1717
#' Must contain:
1818
#' - `timeindays`

R/post_summ.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ post_summ <- function(data,
5555
`50.0%` = quantile(.data$value, 0.50),
5656
`75.0%` = quantile(.data$value, 0.75),
5757
`97.5%` = quantile(.data$value, 0.975))
58-
dplyr::as_tibble(summarize_jags)
58+
tibble::as_tibble(summarize_jags)
5959
}

R/use_att_names.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#' @description
33
#' `use_att_names` takes prepared longitudinal data for antibody kinetic
44
#' modeling and names columns using attribute values to allow merging
5-
#' with a modeled [run_mod()] output [dplyr::tbl_df]. The column names include
5+
#' with a modeled [run_mod()] output [tibble::tbl_df]. The column names include
66
#' `Subject`, `Iso_type`, `t`, and `result`.
77
#' @param data A [data.frame] raw longitudinal data that has been
88
#' prepared for antibody kinetic modeling using [as_case_data()].

man/nepal_sees_jags_output.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_predicted_curve.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/run_mod.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)