if (FALSE) {
# Create a trajectory (trj2) by removing all zero-length
# segments from another trajectory (trj). Keep all points
# that are different from their preceding point, and also
# keep the start point
trj2 <- TrajFromTrjPoints(trj, c(1, which(Mod(trj$displacement) != 0)))
}
Run the code above in your browser using DataLab