Re: [R] Evaluating a multivariable function XXXX

2011-05-07 Thread Duncan Murdoch
On 11-05-07 4:06 AM, Dan Abner wrote: Hello everyone, I have the following R code for a multivariable function: fn2<-function(x,y,z){(y+2*z)/(5*y-x*z)} fn2(-5,-2,3) [1] 0.8 No problems. === If, however, I call the function using a vector substitution for the arguments, R sees this as

Re: [R] Evaluating a multivariable function XXXX

2011-05-07 Thread Dan Abner
> > Hello everyone, > > I have the following R code for a multivariable function: > > > > fn2<-function(x,y,z){(y+2*z)/(5*y-x*z)} > > > > fn2(-5,-2,3) > [1] 0.8 > > > > No problems. > > === > > If, however, I call the function using a vector substitution for the > arguments, R sees this as 3 separa