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

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Jun 27 01:08:15 CEST 2000


"Vadim Kutsyy" <vadim at kutsyy.com> writes:

> > Apropos: Here's a little exercise:
> > 
> > > f<-function(...)nargs()
> > > f(1)
> > [1] 1
> > > f()
> > [1] 0
> > > f(,)
> > [1] 2
> > > f(,,)
> > [1] 3
> > 
> > Now, how do you call f with exactly *one* missing argument?
> 
> Well, you got me.  How do you call it?

This would seem to work:

f(a=)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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