Re: [R] missing argument

2008-12-11 Thread jonas garcia
; Behalf Of Tony Breyal > Sent: Wednesday, December 10, 2008 1:01 PM > To: r-help@r-project.org > Subject: Re: [R] missing argument > > ?missing > > never used it myself, but looks like it might help you :-) > > Tony Breyal. > > On 10 Dec, 19:09, "jonas garcia&q

Re: [R] missing argument

2008-12-10 Thread Bert Gunter
ppropriate. Cheers, Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Breyal Sent: Wednesday, December 10, 2008 1:01 PM To: r-help@r-project.org Subject: Re: [R] missing argument ?missing never used it myself, but looks like it might h

Re: [R] missing argument

2008-12-10 Thread Tony Breyal
I think i might of misunderstood the question. I was thinking you meant what if one of the arguments were not used, as in the example below (see ?missing): f<- function(d1, d2, d3) { vec <- c(missing(d1), missing(d2), missing(d3)) if(any(vec)) { return(0) }

Re: [R] missing argument

2008-12-10 Thread Tony Breyal
?missing never used it myself, but looks like it might help you :-) Tony Breyal. On 10 Dec, 19:09, "jonas garcia" <[EMAIL PROTECTED]> wrote: > Dear list, > I have a question and I'm going to give an example of my problem > > f<- function(d1, d2, d3) > { > d<- d1*d2/d3 > return(d) > > } > > v1<-

[R] missing argument

2008-12-10 Thread jonas garcia
Dear list, I have a question and I'm going to give an example of my problem f<- function(d1, d2, d3) { d<- d1*d2/d3 return(d) } v1<- 1 v2<- 2 If I try f(v1, v2, v3) Error in f(v1, v2, v3) : object "v3" not found I obviously got the above error message. I would like to add something to my functio