Skip to content
Prev 278118 / 398502 Next

How do I query "..." in a function call?

Hi Jonathan,
On Mon, Nov 21, 2011 at 5:18 PM, Jonathan Greenberg <jgrn at illinois.edu> wrote:
`args <- list(...)` will create a list out of the "things" passed
through in `...`

For example:

myfunction <- function(...) {
  args <- list(...)
  length(args) ## this is how many things were passed in
  names(args) ## these are the variable names used
  ## etc.
}

HTH,
-steve