[R] replacing elements of a zoo object

Gabor Grothendieck ggrothendieck at gmail.com
Mon Aug 29 22:06:25 CEST 2011


On Mon, Aug 29, 2011 at 2:45 PM, Gene Leynes <gleynes+r at gmail.com> wrote:
> Why doesn't this work?
>
> x = zoo(1:5, as.Date('2001-01-01')+1:5)
> x[as.Date('2001-01-05')]
> x[as.Date('2001-01-05')] = 0
> x
>

Make sure you have the most recent version of zoo which is this:

> packageVersion("zoo")
[1] ‘1.7.4’


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list