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 works...

I precise that I can not put 'y' explicitly in the argument list since func is an S3 function, I cannot change its arguments.
Any suggestions?

Thanks
Christophe

______________________________________________
R-help@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.

Reply via email to