[R-SIG-Finance] Replacing some observation of a zoo object
bogaso.christofer at gmail.com
Fri Mar 4 12:10:08 CET 2011
Hi all, I having some problem in replacing some observation of a zoo object
with NA. Here I have tries followings:
> MyData <- zooreg(rnorm(60), start=as.Date("2011-01-01"))[-2]
> MyData[as.Date(c("2011-01-01", "2011-01-02", "2011-01-03"))] <- NA ## I
> like to replace values with those indices with 'NA'
Error in dimnames(x) <- dn :
length of 'dimnames'  not equal to array extent
Can somebody point me on the correct approach?
View this message in context: http://r.789695.n4.nabble.com/Replacing-some-observation-of-a-zoo-object-tp3335062p3335062.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance