Re: [R] adding an argument to ...

From: Romain Francois <rfrancois_at_mango-solutions.com>
Date: Tue, 06 May 2008 09:31:44 +0100

Bonjour Christophe,

You can pass ... to a list and then extract its names, so something like:

if( ! "uuu" %in% names(list(...)) )

Good luck with your keyboard,

Romain

cgenolin_at_u-paris10.fr wrote:
> Hi the list
>
> Is it possible to add one argument to the arguments contain in ... ?
>
> I would like to do :
>
> f <- function(ttt,...)[
> if(... does not contain the args uuu)
> [add uuu=3 to ...]
> else[]
> g(ttt,...)
> ]
>
> More precisely, my function g is a callNextMethod()
>
> Thanks
>
> Christophe
>
> PS: sorry for using [ instead of accolade, I am not in my contry and I
> do not manage to get the accolade on this $@ keybord...

-- 
Mango Solutions
data analysis that delivers

Tel:  +44(0) 1249 76 77 00
Fax:  +44(0) 1249 76 77 07
Mob:  +44(0) 7813 52 61 23

______________________________________________
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.
Received on Tue 06 May 2008 - 08:40:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 06 May 2008 - 10:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive