Learn R Programming

kableExtra (version 1.4.0)

listify_args: Convert arguments for a single call into Map-able args

Description

Convert arguments for a single call into Map-able args

Usage

listify_args(
  ...,
  lengths = NA,
  passthru = c("x", "y"),
  notlen1vec = c("lim", "xlim", "ylim"),
  notlen1lst = c("minmax", "min", "max"),
  ignore = c("same_lim")
)

Value

list, generally a list of embedded lists

Arguments

...

Arbitrary arguments to be possibly converted into lists of arguments.

lengths

Allowable lengths of the arguments, typically 1 and the length of the main variable (e.g., "x"). If NA (default), it is not enforced.

passthru

Character vector of variables to pass through with no conversion to lists of values. Extra names (not provided in ...) are ignored.

notlen1vec

Character vector of variables that are known to be length over 1 for a single plot call, so it will always be list-ified and extra care to ensure it is grouped correctly. Extra names (not provided in ...) are ignored.

notlen1lst

Character vector of variables that are lists, so the inner list length is not checked/enforced. (For example, if a single plot call takes an argument list(a=1,b=2,d=3) and the multi-data call creates three plots, then a naive match might think that the first plot would get list(a=1), second plot gets list(b=2), etc. Adding that list-argument to this 'notlen1lst' will ensure that the full list is passed correctly.) Extra names (not provided in ...) are ignored.

ignore

Character vector of variables to ignore, never returned. (Generally one can control this by not adding the variable in the first place, but having this here allows some sanity checks and/or programmatic usage.)