[R] help with rle function on paired data
Steve E.
searl at vt.edu
Fri Jun 8 23:33:15 CEST 2012
Dear R Community - I hope you might be able to provide some guidance
regarding the use of the rle function. I have a set of time-series data
where a measured value is recorded every 30 seconds after the start of an
experiment. Many of the measured values repeat and I am interested only in
the values when there is a change. If I turn the measured values into a
vector, the rle function works perfectly for this but I need also the
corresponding time of the value and I am not sure how to use rle on paired
data. Below is a brief example to help explain the problem. I thank you in
advance for any assistance you might be able to provide. Regards, Steve
Original dataset:
ElpsdTime, DataValue
0, 1
30, 1
60, 1
90, 2
120, 2
150, 3
180, 2
210, 3
240, 3
.
.
Desired dataset:
ElpTime DataValue
0, 1
90, 2
150, 3
180, 2
210, 3
.
.
--
View this message in context: http://r.789695.n4.nabble.com/help-with-rle-function-on-paired-data-tp4632856.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list