I have time-series data looking like this:
> dataIn[sample(c(1:nrow(dataIn)), 25),]
     accelerometer_y     id data_block_epoch_time
782           0.8424 201300         1331797330000
1868          0.3432 202386         1331797384000
1828          0.3510 202346         1331797382000
1026          0.2184 201544         1331797342000
1569          0.3432 202087         1331797369000
1453          0.3588 201971         1331797363000
1204          0.3666 201722         1331797351000
1821          0.3588 202339         1331797382000
860           0.8658 201378         1331797333000
910           0.8580 201428         1331797336000
1488          0.3432 202006         1331797365000
578           0.9126 201096         1331797319000
1478          0.3666 201996         1331797364000
1183          0.3588 201701         1331797350000
29           -0.1716 200547         1331797292000
1540          0.3588 202058         1331797367000
392          -0.1560 200910         1331797310000
1533          0.3744 202051         1331797367000
1016          0.6318 201534         1331797341000
314          -0.1560 200832         1331797306000
410          -0.1638 200928         1331797311000
769           0.8580 201287         1331797329000
1101          0.3588 201619         1331797346000
403          -0.1638 200921         1331797311000
1794          0.3666 202312         1331797380000

The id field represents the subsecond value in the timestamp (n
ids/second). What I'd like to do is combine the fields, so that I'm left
with an equally-spaced timeseries with readings. What's the most efficient
way to do this using R? There are an arbitrary number of timestamps per
second. Many thanks! -- H
-- 
Sent from my mobile device
Envoyait de mon portable

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to