Re: [R] Precision error in time index of ts objects

2017-09-02 Thread Achim Zeileis
On Sat, 2 Sep 2017, Andrea Altomani wrote: Thanks for the very detailed explanation. I did not create the series using structure(), that was the result of dump() on an intermediate object created within tsdisagg::ta(), There is no tsdisagg package on CRAN, just tsdisagg2. But this does not ha

Re: [R] Precision error in time index of ts objects

2017-09-02 Thread Andrea Altomani
Thanks for the very detailed explanation. I did not create the series using structure(), that was the result of dump() on an intermediate object created within tsdisagg::ta(), which is where I found the error in the first place. ta() indeed manipulates .Tsp directly, rather than using ts. I guess

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Achim Zeileis
On Fri, 1 Sep 2017, Andrea Altomani wrote: I should have formulated my question in a more specific way. 1. I suspect this is a floating point precision issue. I am not very knowledgeable about R internals, can someone else confirm it? Yes. If you represent a series with increment 1/12 it dep

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Andrea Altomani
I should have formulated my question in a more specific way. 1. I suspect this is a floating point precision issue. I am not very knowledgeable about R internals, can someone else confirm it? 2. Should this be considered a bug or not, because it is "just a precision issue"? Should I report it? 3

Re: [R] Precision error in time index of ts objects

2017-09-01 Thread Jeff Newmiller
You already know the answer. Why ask? -- Sent from my phone. Please excuse my brevity. On September 1, 2017 7:23:24 AM PDT, Andrea Altomani wrote: >I have a time series x, and two other series obtained from it: > >x <- structure(2017, .Tsp = c(2017.417, 2017.417, 12), >class =

[R] Precision error in time index of ts objects

2017-09-01 Thread Andrea Altomani
I have a time series x, and two other series obtained from it: x <- structure(2017, .Tsp = c(2017.417, 2017.417, 12), class = "ts") y <- floor(x) z <- x-y I would expect the three series to have exactly the same index. However I get the following > time(x)-time(y) Jun 2017