Re: [R] Rbind for appending zoo objects

From: Achim Zeileis <>
Date: Tue 30 Jan 2007 - 11:03:46 GMT

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".

Z mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Jan 30 22:15:02 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 30 Jan 2007 - 12:30:25 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.