Learn R Programming

EpiNow2 (version 1.3.2)

match_output_arguments: Match User Supplied Arguments with Supported Options

Description

Match user supplied arguments with supported options and return a logical list for internal usage

Usage

match_output_arguments(
  input_args = c(),
  supported_args = c(),
  logger = NULL,
  level = "info"
)

Arguments

input_args

A character vector of input arguments (can be partial).

supported_args

A character vector of supported output arguments.

logger

A character vector indicating the logger to target messages at. Defaults to no logging.

level

Character string defaulting to "info". Logging level see documentation of futile.logger for details. Supported options are "info" and "debug"

Value

A logical vector of named output arguments

Examples

Run this code
# NOT RUN {
# select nothing
EpiNow2:::match_output_arguments(supported_args = c("fit", "plots", "samples"))

# select just plots
EpiNow2:::match_output_arguments("plots", supported_args = c("fit", "plots", "samples"))

# select plots and samples
EpiNow2:::match_output_arguments(c("plots", "samples"),
                       supported_args = c("fit", "plots", "samples"))

# lazily select arguments
EpiNow2:::match_output_arguments("p",
                       supported_args = c("fit", "plots", "samples"))
# }

Run the code above in your browser using DataLab