diff --git a/.Rbuildignore b/.Rbuildignore index 958b4f56..55e73619 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -21,6 +21,8 @@ allpopsamples_hlye.csv$ ^serocalculator.*\.tgz$ ^inst/extdata ^CRAN-SUBMISSION$ +^vignettes/rsconnect$ +^rsconnect$ ^README\.qmd$ ^codecov\.yml$ ^_quarto\.yml$ diff --git a/.gitignore b/.gitignore index f2f0195f..174ebed5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ src-x64 serocalculator.Rcheck/ serocalculator*.tar.gz serocalculator*.tgz +rsconnect README.html README_files diff --git a/DESCRIPTION b/DESCRIPTION index a059428a..4c57a17d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: serocalculator Title: Estimating Infection Rates from Serological Data -Version: 1.2.0.9018 +Version: 1.2.0.9019 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/NAMESPACE b/NAMESPACE index 433fd515..c8b3de22 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -33,6 +33,7 @@ export(load_curve_params) export(load_noise_params) export(load_pop_data) export(log_likelihood) +export(plot_curve_params_one_ab) export(sim.cs) export(sim.cs.multi) importFrom(Rcpp,sourceCpp) diff --git a/R/autoplot.curve_params.R b/R/autoplot.curve_params.R index f1040419..15008a90 100644 --- a/R/autoplot.curve_params.R +++ b/R/autoplot.curve_params.R @@ -6,15 +6,17 @@ #' @param ncol how many columns of subfigures to use in panel plot #' @details #' ## `rows_to_graph` -#' Note that if you directly specify `rows_to_graph` when calling this function, +#' If you directly specify `rows_to_graph` when calling this function, #' the row numbers are enumerated separately for each antigen isotype; #' in other words, for the purposes of this argument, -#' row numbers start over at 1 for each antigen isotype. There is currently -#' no way to specify different row numbers for different antigen isotypes; -#' if you want to do that, you could call [plot_curve_params_one_ab()] -#' directly for each antigen isotype and combine the resulting panels yourself. -#' Or you could subset `curve_params` manually, before passing it to this -#' function, and set the `n_curves` argument to `Inf`. +#' row numbers start over at 1 for each antigen isotype. +#' There is currently no way to specify different row numbers for different antigen isotypes; +#' if you want to do that, +#' you will could call [plot_curve_params_one_ab()] directly for each antigen isotype +#' and combine the resulting panels yourself. +#' Or you could subset `curve_params` manually, +#' before passing it to this function, +#' and set the `n_curves` argument to `Inf`. #' @return a [ggplot2::ggplot()] object #' @export #' @examples @@ -25,7 +27,7 @@ #' #' curve = load_curve_params("https://osf.io/download/rtw5k/") %>% #' filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>% -#' slice(1:100, .by = antigen_iso) %>% # Reduce dataset for this example +#' slice(1:100, .by = antigen_iso) %>% # Reduce dataset for this example #' autoplot() #' #' curve diff --git a/R/graph.decay.curves.R b/R/graph.decay.curves.R index a9248be8..f9b3ebfb 100644 --- a/R/graph.decay.curves.R +++ b/R/graph.decay.curves.R @@ -71,8 +71,8 @@ plot_curve_params_one_ab <- function( alpha = alpha, fun = ab0, args = list(curve_params = cur_params), - n = n_points - ) + n = n_points, + ...) } layers <- diff --git a/man/autoplot.curve_params.Rd b/man/autoplot.curve_params.Rd index 933c45f6..0724156c 100644 --- a/man/autoplot.curve_params.Rd +++ b/man/autoplot.curve_params.Rd @@ -49,15 +49,17 @@ graph antibody decay curves by antigen isotype \details{ \subsection{\code{rows_to_graph}}{ -Note that if you directly specify \code{rows_to_graph} when calling this function, +If you directly specify \code{rows_to_graph} when calling this function, the row numbers are enumerated separately for each antigen isotype; in other words, for the purposes of this argument, -row numbers start over at 1 for each antigen isotype. There is currently -no way to specify different row numbers for different antigen isotypes; -if you want to do that, you could call \code{\link[=plot_curve_params_one_ab]{plot_curve_params_one_ab()}} -directly for each antigen isotype and combine the resulting panels yourself. -Or you could subset \code{curve_params} manually, before passing it to this -function, and set the \code{n_curves} argument to \code{Inf}. +row numbers start over at 1 for each antigen isotype. +There is currently no way to specify different row numbers for different antigen isotypes; +if you want to do that, +you will could call \code{\link[=plot_curve_params_one_ab]{plot_curve_params_one_ab()}} directly for each antigen isotype +and combine the resulting panels yourself. +Or you could subset \code{curve_params} manually, +before passing it to this function, +and set the \code{n_curves} argument to \code{Inf}. } } \examples{ @@ -68,7 +70,7 @@ library(magrittr) curve = load_curve_params("https://osf.io/download/rtw5k/") \%>\% filter(antigen_iso \%in\% c("HlyE_IgA", "HlyE_IgG")) \%>\% - slice(1:100, .by = antigen_iso) \%>\% # Reduce dataset for this example + slice(1:100, .by = antigen_iso) \%>\% # Reduce dataset for this example autoplot() curve diff --git a/man/plot_curve_params_one_ab.Rd b/man/plot_curve_params_one_ab.Rd index 9b312a07..886bf624 100644 --- a/man/plot_curve_params_one_ab.Rd +++ b/man/plot_curve_params_one_ab.Rd @@ -117,6 +117,6 @@ library(dplyr) # loads the `\%>\%` operator and `dplyr::filter()` load_curve_params("https://osf.io/download/rtw5k/") \%>\% dplyr::filter(antigen_iso == "HlyE_IgG") \%>\% - serocalculator:::plot_curve_params_one_ab() - + serocalculator::plot_curve_params_one_ab() } +\keyword{internal}