Dear R-helpers,

It seems to me that a character zoo cannot be coerced to a numeric zoo.
Below is a minimal example. Can someone tell me what I have done wrong?

> z<-zoo(1:4,order.by=1:4)
> coredata(z)<-as.character(coredata(z))
> str(z)
‘zoo’ series from 1 to 4
  Data: chr [1:4] "1" "2" "3" "4"
  Index:  int [1:4] 1 2 3 4
> coredata(z)<-as.numeric(coredata(z))
> str(z)
‘zoo’ series from 1 to 4
  Data: chr [1:4] "1" "2" "3" "4"
  Index:  int [1:4] 1 2 3 4


Many thanks,
Ashim

	[[alternative HTML version deleted]]

