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

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] nargs() inside "[.myclass"
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Tue 27 Jun 2000 - 09:08:15 EST


Message-ID: <x2zoo8rqg0.fsf@blueberry.kubism.ku.dk>

"Vadim Kutsyy" <vadim@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@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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Mon 17 Jul 2000 - 12:33:24 EST