Learn R Programming

cmdfun (version 1.0.2)

cmd_list_interp: Convert list of function arguments to list of command flags

Description

Function also handles error checking to ensure args contain valid data types, and looks for common usage mistakes.

Usage

cmd_list_interp(args, flag_lookup = NULL)

Arguments

args

named list output from get*Args family of functions.

flag_lookup

optional named vector used to convert args to command flags

Value

named list

Details

The list structure is more amenable to manipulation by package developers for advanced use before evaluating them to the command flags vector with cmd_list_to_flags().

Examples

Run this code
# NOT RUN {
theFunction <- function(...){cmd_args_all()}
theArgs <- theFunction(arg1 = "value", arg2 = TRUE)
flagList <- cmd_list_interp(theArgs)
flags <- cmd_list_to_flags(flagList)
# }

Run the code above in your browser using DataLab