Skip to content

Commit

Permalink
check using ... properly
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Dec 2, 2024
1 parent 6464e95 commit f42a182
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions R/latent_model.R
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#' Convert an object to an `epidist_latent_model` object
#'
#' @param data An object to be converted to the class `epidist_latent_model`
#' @param ... Additional arguments passed to methods.
#' @family latent_model
#' @export
as_epidist_latent_model <- function(data) {
as_epidist_latent_model <- function(data, ...) {
UseMethod("as_epidist_latent_model")
}


#' The latent model method for `epidist_linelist_data` objects
#'
#' @param data An `epidist_linelist_data` object
#' @param ... Not used in this method.
#' @method as_epidist_latent_model epidist_linelist_data
#' @family latent_model
#' @autoglobal
#' @export
as_epidist_latent_model.epidist_linelist_data <- function(data) {
as_epidist_latent_model.epidist_linelist_data <- function(data, ...) {
assert_epidist(data)
data <- data |>
mutate(
Expand Down
3 changes: 2 additions & 1 deletion R/marginal_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ as_epidist_marginal_model <- function(data, ...) {
#' relative observation times to Inf. Observation times greater than
#' `obs_time_threshold` times the maximum delay will be set to Inf to improve
#' model efficiency. Default is 2.
#' @param ... Not used in this method.
#' @method as_epidist_marginal_model epidist_linelist_data
#' @family marginal_model
#' @autoglobal
#' @export
as_epidist_marginal_model.epidist_linelist_data <- function(
data, obs_time_threshold = 2) {
data, obs_time_threshold = 2, ...) {
assert_epidist(data)

data <- data |>
Expand Down
4 changes: 3 additions & 1 deletion man/as_epidist_latent_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/as_epidist_latent_model.epidist_linelist_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/as_epidist_marginal_model.epidist_linelist_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f42a182

Please sign in to comment.