Skip to content
Prev 260171 / 398502 Next

Date_Time detected as Duplicated (but they are not!)

I have a problem with duplicated date_time stamps that I do not see as
duplicated.

I read a file with observations taken every 30 minutes:
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
1 1/1/2009 0:00        0           NaN      5.86            NaN
2 1/1/2009 0:30        0           NaN      5.05            NaN
3 1/1/2009 1:00        0           NaN      5.56            NaN
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
1 2009-01-01 00:00:00        0           NaN      5.86            NaN
2 2009-01-01 00:30:00        0           NaN      5.05            NaN
3 2009-01-01 01:00:00        0           NaN      5.56            NaN
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
2009-01-01 00:00:00 1230764400        0           NaN      5.86            NaN
2009-01-01 00:30:00 1230766200        0           NaN      5.05            NaN
2009-01-01 01:00:00 1230768000        0           NaN      5.56            NaN

Then:
Warning message:
In zoo(aur2009[, 2:12], as.POSIXct(delme)) :
  some methods for ?zoo? objects do not work if the index entries in
?order.by? are not unique

So I investigate:
[1] TRUE
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
2009-03-29 02:00:00 1238284800        0           NaN       1.2            NaN
2009-03-29 02:30:00 1238286600        0           NaN       1.2            NaN

But note the surprise:
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
2009-03-29 01:00:00 1238284800        0           NaN     -0.58            NaN
2009-03-29 02:00:00 1238284800        0           NaN      1.20            NaN
Date.Time E_filled E_filled_flag LE_filled LE_filled_flag
2009-03-29 01:30:00 1238286600        0           NaN     -0.34            NaN
2009-03-29 02:30:00 1238286600        0           NaN      1.20            NaN

The dates detected as duplicated are actually different times that got
the same value in the ts version of the object!
What am I doing wrong? They are all observations every 30min, why are
these 2 encoded as the
same time?

Any help appreciated

Agus