Displaying 2 results from an estimated 2 matches for "getdot".
Did you mean:
netdot
2011 Sep 17
1
Name the dots! ("...")
Dear Folk--
Suppose I have some objects A, B & C, and a function
getDots <- function(...) {args <- list(...) etc.}
If I do a call to getDots(A, B, C) then the variable args will be assigned
to a list which contains the objects to which A, B & C refer, but which will
not (except by happenstance) contain the names A, B, or C. I would like
getDots to return a...
2006 Mar 02
5
Deparsing '...'
Hi,
The following function works, but is there a neater way to write it?
f = function(x,...)
{
# return a character vector of the arguments passed in after 'x'
gsub("
","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1]
}
> f(x,a,b,c*d)
[1] "a" "b" "c*d"
>
Thanks.
[[alternative HTML