-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 garcia.jona...@googlemail.com
wrote:
Dear list,
I have a question and I'm going to give an example of my problem
f
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 function to
?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- 1
v2- 2
If I
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)
}
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 help you :-)
Tony Breyal
5 matches
Mail list logo