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'
> MyData
Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent
Can somebody point me on the correct approach?
Thanks,
--
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.
_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.