I have a XTS object with millisecond time-stamps, the differences between indexes are irregular. Is there an easy way of reducing this time-series to 50ms samples, or 1 second samples for that matter?
Yes, in essence the approach is to
seq(startPOSIXt, endPOSIXt, by=fracsec)which can be a
double, eg 0.1 for 100ms as an "empty"
na.locf()to your data
and presto! you have the most-recent observations at the time points you called for.