[Rd] do.call(): no need for quote {was .. Questions about calls..}

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Tue 23 Aug 2005 - 09:21:23 GMT

>>>>> "Gabor" == Gabor Grothendieck <ggrothendieck@gmail.com>
>>>>> on Mon, 22 Aug 2005 18:55:38 -0400 writes:


    Gabor> Try do.call like this:

    Gabor> ff <- x ~ g*h
    Gabor> do.call("substitute", list(ff, list(x = as.name("weight"))))

Just a small remark: For all those who -- like me -- have found it ``unpleasant'' to have to quote the first argument of do.call(): You don't have to any longer since the NEWS of R 2.1.0 contains

    o	do.call() now takes either a function or a character string as
	its first argument.  The supplied arguments can optionally be

So the above could be

   do.call(substitute, list(ff, list(x = as.name("weight"))))


R-devel@r-project.org mailing list
Received on Tue Aug 23 19:30:16 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:18 GMT