On Oct 19, 2007, at 10:25 AM, Petr PIKAL wrote: > E.g. > > mat<-cbind(x,y) > Ah, that's an interesting idea, though it assumes they are of the same mode (admittedly, in my example they are, I should have made up an example where one of them is a character vector).
> gives you desired recycling in matrix form or > > x*(y>0) > > if you know that y is longer than x and all number are bigger than 0. I had tried something similar, namely x+0*y, but that only works if they are both numeric and further the length of y must be a multiple of length of x to avoid a warning. > Regards > Petr Thanks, Haris Skiadas Department of Mathematics and Computer Science Hanover College ______________________________________________ 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.