Re: [R] Problems with rbind

From: Dieter Menne <>
Date: Sat, 15 Nov 2008 09:19:17 -0800 (PST)

TU wrote:
> A recent update on base packages on my R installation has introduced a
> problem to my code which did not exist before the update. The offending
> function is rbind, which fails where it was working just fine before the
> update.
> I have two zoo objects, foo and bar, indexed by class Date. foo starts
> from "2007-10-09" and bar from "2007-10-10". I attempt to pad bar with a
> zero on Date "2007-10-09".

Your example works for me:

> library(zoo)

Attaching package: 'zoo'

        The following object(s) are masked from package:base :

> foo<-zoo(1,"2007-10-09"))
> bar<-zoo(2,"2007-10-10"))
> bar <- rbind(zoo(0, = index(foo)[1]), bar)
> bar
2007-10-09 2007-10-10

         0 2

> sessionInfo()

R version 2.8.0 (2008-10-20)


attached base packages:
[1] stats graphics grDevices datasets utils methods base

other attached packages:
[1] zoo_1.5-4

loaded via a namespace (and not attached): [1] grid_2.8.0 lattice_0.17-15 tools_2.8.0  

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 15 Nov 2008 - 17:25:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 15 Nov 2008 - 19:31:43 GMT.

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

list of date sections of archive