Re: [R] Dealing with an argument missing in ...

2010-03-10 Thread David Winsemius
On Mar 10, 2010, at 5:43 AM, Achim Zeileis wrote: On Wed, 10 Mar 2010, Christophe Genolini wrote: Hi the list I define a S3 function that can have a various number of argument using '...' When some arguments are missing, I would like to give them some default value: func.numeric <- fun

Re: [R] Dealing with an argument missing in ...

2010-03-10 Thread Gavin Simpson
On Wed, 2010-03-10 at 11:28 +0100, Christophe Genolini wrote: > Hi the list > > I define a S3 function that can have a various number of argument using > '...' > When some arguments are missing, I would like to give them some default > value: > > func.numeric <- function(x,...){ >if(missin

Re: [R] Dealing with an argument missing in ...

2010-03-10 Thread Achim Zeileis
On Wed, 10 Mar 2010, Christophe Genolini wrote: Hi the list I define a S3 function that can have a various number of argument using '...' When some arguments are missing, I would like to give them some default value: func.numeric <- function(x,...){ if(missing(y)){y<-3} } But it does not w