[R] How to get function arguments as list?

Rui Barradas ruipbarradas at sapo.pt
Sun Feb 9 13:28:11 CET 2014


Hello,

Inside the function try

dots <- list(...)


Hope this helps,

Rui Barradas

Em 09-02-2014 12:14, Robert Latest escreveu:
> Hello all,
>
> To set options in a package I'm putting together I'd like to write a
> function like options, that is:
>
> my.options <- function(...) {
> # ...
> }
>
> Now I'd like to access the named arguments that were passed to my
> funtion within that function. How does that work? formals() doesn't do
> it, neither does args() or alist().
>
> How is that done?
>
> Thanks,
> robert
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list