[R] Error produced by read.zoo: "bad entries"

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jul 23 19:56:01 CEST 2010


On Fri, Jul 23, 2010 at 1:39 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> Very sorry - I mistunderstood and confused split with index.column -
> totally my fault.
> Ok, now I've run this line:
>
> z <- read.zoo(OrigData, index.column = 2, split = "Brand")
>
> And I am getting:
> Error in merge.zoo(` Plus` = c(NA, 98L, 95L, 97L, NA, 98L, 97L, 98L, NA,  :
>  series cannot be merged with non-unique index entries in a series
> In addition: There were 11 warnings (use warnings() to see them)
>
> And under warnings() it says:
> 1: In zoo(rval4[[i]], ix[[i]]) :
>  some methods for “zoo” objects do not work if the index entries in
> ‘order.by’ are not unique
>

There may be something wrong with the data.  The warning is an alert
to the fact that we have at least one brand for which there are
duplicate dates.  One would have expected that dates are unique within
brand (or if its ok to have duplicate dates within brand then they
should be aggregated as they are read them in using the aggregate=
argument of read.zoo) .



More information about the R-help mailing list