On Thu, Mar 22, 2012 at 08:43:00AM -0700, stella wrote:
> Hi,
> 
> I wrote a function with three inputs fun(x,y,z).
> 
> x is a matrix of three vectors combined with cbind. e.g.
> 
> x1<-(1,2,3,4)
> x2<-(2,3,4,5)
> x3<-(3,4,5,6)
> 
> x<-cbind(x1,x2,x3)
> 
> y is a vector e.g 
> y<-c(7,8,9)
> 
> z is a real number e.g.
> z<-2.5
> 
> If a give the function an input like this, I get 'NA' in return. If I give
> the function a vector e.g c(1,2,3) instead of 'x' the function works just
> fine. 
> Does anyone has an idea why the function would not except 'x' as an input?

Hi.

Can you send also the function? Without it, it is hard
to guess the source of the error.

Petr Savicky.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to