From c277d5c183442baaf432635b0b084a6229c4ea59 Mon Sep 17 00:00:00 2001 From: James Azam Date: Wed, 1 Nov 2023 21:07:57 +0000 Subject: [PATCH] Remove awkward line breaks --- R/checks.R | 6 +++--- R/estimate_secondary.R | 15 +++++++-------- man/check_reports_valid.Rd | 5 ++--- man/secondary_opts.Rd | 15 +++++++-------- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/R/checks.R b/R/checks.R index 68c0a0a36..96898c2db 100644 --- a/R/checks.R +++ b/R/checks.R @@ -9,14 +9,14 @@ #' @param reports A data frame with either: #' * a minimum of two columns: `date` and `confirm`, if to be #' used by [estimate_infections()] or [estimate_truncation()], or -#' * a minimum of three columns: `date`, `primary`, and `secondary`, if -#' to be used by -#' [estimate_secondary()]. +#' * a minimum of three columns: `date`, `primary`, and `secondary`, if to be +#' used by [estimate_secondary()]. #' @param model The EpiNow2 model to be used. Either #' "estimate_infections", "estimate_truncation", or "estimate_secondary". #' This is used to determine which checks to perform on the data input. #' @importFrom checkmate assert_data_frame assert_date assert_names #' assert_numeric +#' @importFrom rlang arg_match #' @return Called for its side effects. #' @author James M. Azam #' @keywords internal diff --git a/R/estimate_secondary.R b/R/estimate_secondary.R index dc4a6f0c3..fd1d6f477 100644 --- a/R/estimate_secondary.R +++ b/R/estimate_secondary.R @@ -253,14 +253,13 @@ estimate_secondary <- function(reports, #' #' @seealso estimate_secondary #' @return A `` object of binary options summarising secondary -#' model used in -#' `estimate_secondary()`. Options returned are `cumulative` (should the -#' secondary report be cumulative), `historic` (should a convolution of primary -#' reported cases be used to predict secondary reported cases), -#' `primary_hist_additive` (should the historic convolution of primary reported -#' cases be additive or subtractive), `current` (should currently observed -#' primary reported cases contribute to current secondary reported cases), -#' `primary_current_additive` (should current primary reported cases be +#' model used in `estimate_secondary()`. Options returned are `cumulative` +#' (should the secondary report be cumulative), `historic` (should a +#' convolution of primary reported cases be used to predict secondary reported +#' cases), `primary_hist_additive` (should the historic convolution of primary +#' reported cases be additive or subtractive), `current` (should currently +#' observed primary reported cases contribute to current secondary reported +#' cases), `primary_current_additive` (should current primary reported cases be #' additive or subtractive). #' #' @export diff --git a/man/check_reports_valid.Rd b/man/check_reports_valid.Rd index db9d2ea7f..e87f74f24 100644 --- a/man/check_reports_valid.Rd +++ b/man/check_reports_valid.Rd @@ -11,9 +11,8 @@ check_reports_valid(reports, model) \itemize{ \item a minimum of two columns: \code{date} and \code{confirm}, if to be used by \code{\link[=estimate_infections]{estimate_infections()}} or \code{\link[=estimate_truncation]{estimate_truncation()}}, or -\item a minimum of three columns: \code{date}, \code{primary}, and \code{secondary}, if -to be used by -\code{\link[=estimate_secondary]{estimate_secondary()}}. +\item a minimum of three columns: \code{date}, \code{primary}, and \code{secondary}, if to be +used by \code{\link[=estimate_secondary]{estimate_secondary()}}. }} \item{model}{The EpiNow2 model to be used. Either diff --git a/man/secondary_opts.Rd b/man/secondary_opts.Rd index d7e95df35..31bb22242 100644 --- a/man/secondary_opts.Rd +++ b/man/secondary_opts.Rd @@ -25,14 +25,13 @@ options that can be passed.} } \value{ A \verb{} object of binary options summarising secondary -model used in -\code{estimate_secondary()}. Options returned are \code{cumulative} (should the -secondary report be cumulative), \code{historic} (should a convolution of primary -reported cases be used to predict secondary reported cases), -\code{primary_hist_additive} (should the historic convolution of primary reported -cases be additive or subtractive), \code{current} (should currently observed -primary reported cases contribute to current secondary reported cases), -\code{primary_current_additive} (should current primary reported cases be +model used in \code{estimate_secondary()}. Options returned are \code{cumulative} +(should the secondary report be cumulative), \code{historic} (should a +convolution of primary reported cases be used to predict secondary reported +cases), \code{primary_hist_additive} (should the historic convolution of primary +reported cases be additive or subtractive), \code{current} (should currently +observed primary reported cases contribute to current secondary reported +cases), \code{primary_current_additive} (should current primary reported cases be additive or subtractive). } \description{