R/utilities.R
match_output_arguments.Rd
A character vector of input arguments (can be partial).
A character vector of supported output arguments.
A character vector indicating the logger to target messages at. Defaults to no logging.
Character string defaulting to "info". Logging level see documentation of futile.logger for details. Supported options are "info" and "debug"
A logical vector of named output arguments
# select nothing
EpiNow2:::match_output_arguments(supported_args = c("fit", "plots", "samples"))
#> fit plots samples
#> FALSE FALSE FALSE
# select just plots
EpiNow2:::match_output_arguments("plots", supported_args = c("fit", "plots", "samples"))
#> fit plots samples
#> FALSE TRUE FALSE
# select plots and samples
EpiNow2:::match_output_arguments(c("plots", "samples"),
supported_args = c("fit", "plots", "samples")
)
#> fit plots samples
#> FALSE TRUE TRUE
# lazily select arguments
EpiNow2:::match_output_arguments("p",
supported_args = c("fit", "plots", "samples")
)
#> fit plots samples
#> FALSE TRUE TRUE