[R] Odp: Manual recycling of vectors?
cskiadas at gmail.com
Fri Oct 19 16:38:31 CEST 2007
On Oct 19, 2007, at 10:25 AM, Petr PIKAL wrote:
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
> 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.
Department of Mathematics and Computer Science
More information about the R-help