[R] Deparsing '...'

From: Matthew Dowle <mdowle_at_concordiafunds.com>
Date: Fri 03 Mar 2006 - 03:34:14 EST

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 version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Mar 03 03:55:48 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 06:08:21 EST