[R] nargs() inside "[.myclass"

Vadim Kutsyy vadim at kutsyy.com
Tue Jun 27 00:01:39 CEST 2000


> This does seem to work:
> 
> > "[.myclass"<-function(x,...)
> > {n<-nargs();if(n==2&&missing(..1))n<-1;print(n-1)}
> >  x[]
> [1] 0
> >  x[1]
> [1] 1
> >  x[1,2]
> [1] 2


It does, thank you.  could you explain what ..1 stands for?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list