[R] Rbind for appending zoo objects

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Tue Jan 30 12:03:46 CET 2007

On Tue, 30 Jan 2007, Shubha Vishwanath Karanth wrote:

> 1.	The above rbind function for the zoo objects doesn't take care
> of the column names while merging. Example: Column 'a' of y1 is appended
> with column 'b' of y2. Why is this so?

We do not check the column names at all. This should probably be changed.

> How do I get rid of this?

Sort the columns by hand before calling rbind().

> 2.	In the rbind function, I have given y2 first and then y1. But in
> the appended data, I see the data corresponding to y1 first and then of
> y2. Is this because of ordering of the index elements of the zoo
> objects?

Yes, recall that the second "o" in "zoo" means "ordered".


More information about the R-help mailing list