reduceNbTimes simplify some trajectories (in long format) by reducing their number of points.
Usage
reduceNbTimes(trajLong, nbPoints, spar=NA)
Arguments
trajLong
[data.frame]: data.frame that hold the
trajectories in long format. The data.frame has to be
(no choice!) in the following format: the first column should be the individual
indentifiant. The second should be the times at which the measurement
are made. The third one should be the measurement.
nbPoints
[numeric]: fixe the number of that the
simplified trajectories should have.
spar
[numeric]: smoothing parameter that is used if the
trajectories shall be smoothed before being simplified.
Details
reduceNbTimes simplify some trajectories by reducing their number of points.
The trajectories should be in long format.
If a value is given to spar (different from NA), trajectories are smoothed using smooth.spline.
The reduction of the number of point is done using a variation of
Douglas-Peucker algorithme based on the number of points
instead of an epsilon.
Value
A data.frame holding the simplified trajectories, in long format.