Skip to content

Commit

Permalink
Remove n_args check on delay_density, fixes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikunterwegs committed Oct 26, 2023
1 parent 0117f2a commit 08f870a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/estimate_ascertainment.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ estimate_ascertainment <- function(data,
"`delay_density` must be a distribution density function with 1 argument
evaluating density at a vector of values and returning a numeric vector.
E.g. function(x) stats::dgamma(x = x, shape = 5, scale = 1)" =
checkmate::test_function(delay_density, nargs = 1, null.ok = TRUE)
checkmate::test_function(delay_density, null.ok = TRUE)
)

# match argument for type
Expand Down
2 changes: 1 addition & 1 deletion R/estimate_rolling.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cfr_rolling <- function(data,
"`delay_density` must be a distribution density function with 1 argument
evaluating density at a vector of values and returning a numeric vector.
E.g. function(x) stats::dgamma(x = x, shape = 5, scale = 1)" =
checkmate::test_function(delay_density, nargs = 1, null.ok = TRUE)
checkmate::test_function(delay_density, null.ok = TRUE)
)
checkmate::assert_count(poisson_threshold)

Expand Down
2 changes: 1 addition & 1 deletion R/estimate_static.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ cfr_static <- function(data,
"`delay_density` must be a distribution density function with 1 argument
evaluating density at a vector of values and returning a numeric vector.
E.g. function(x) stats::dgamma(x = x, shape = 5, scale = 1)" =
checkmate::test_function(delay_density, nargs = 1, null.ok = TRUE)
checkmate::test_function(delay_density, null.ok = TRUE)
)
checkmate::assert_count(poisson_threshold)

Expand Down
2 changes: 1 addition & 1 deletion R/estimate_time_varying.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ cfr_time_varying <- function(data,
"`delay_density` must be a distribution density function with 1 argument
evaluating density at a vector of values and returning a numeric vector.
E.g. function(x) stats::dgamma(x = x, shape = 5, scale = 1)" =
checkmate::test_function(delay_density, nargs = 1, null.ok = TRUE)
checkmate::test_function(delay_density, null.ok = TRUE)
)

# prepare a new dataframe with smoothed columns if requested
Expand Down
2 changes: 1 addition & 1 deletion R/known_outcomes.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ known_outcomes <- function(data,
"`delay_density` must be a distribution density function with 1 argument
evaluating density at a vector of values and returning a numeric vector.
E.g. function(x) stats::dgamma(x = x, shape = 5, scale = 1)" =
checkmate::test_function(delay_density, nargs = 1, null.ok = TRUE)
checkmate::test_function(delay_density, null.ok = TRUE)
)

pmf_vals <- delay_density(seq(from = 0, to = nrow(data) - 1L))
Expand Down

0 comments on commit 08f870a

Please sign in to comment.