[R] combining vectors on unequal length
ggrothendieck at gmail.com
Thu Oct 4 21:30:23 CEST 2007
Assuming they are numeric, cbind them as time series:
as.data.frame(cbind(x = ts(1:10), y = ts(1:5)))
On 10/4/07, Nair, Murlidharan T <mnair at iusb.edu> wrote:
> If I have two vectors
> When I combine them using cbind, the shorter one is repeated and both are made of the same length. Is there a methods that does this without duplicating the shorter one. I want to use this to store the data back to a file.
> Thanks ../Murli
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help