[R] deparseDots to get names of all arguments?
Rolf Turner
r.turner at auckland.ac.nz
Tue Feb 20 23:47:39 CET 2018
On 21/02/18 11:36, Spencer Graves wrote:
> Hi, All:
>
>
> How can I get the names of all the arguments in dots(...)?
>
>
> I'm able to get the name of the first argument but not the second:
>
>
>
> deparseDots <- function(...){
> deparse(substitute(...))
> }
> a <- 1
> b <- 2
> deparseDots(a, b)
> [1] "a"
>
> > I'd like to get c('a', 'b').
Does
names(list(...))
do what you want?
cheers,
Rolf
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-help
mailing list