[R] adding an argument to ...

Romain Francois rfrancois at mango-solutions.com
Tue May 6 10:31:44 CEST 2008


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



More information about the R-help mailing list