edzer / spacetime

Classes and methods for spatio-temporal data
74 stars 20 forks source link

Updated "generalize" methods #7

Closed ghost closed 11 years ago

ghost commented 11 years ago

See the comments for what has been changed.

Try:

library(spacetime)
example(Track)
g1 = generalize(B, max, timeInterval = "2 min")
g2 = generalize(A2, distance = 200)
g3 = generalize(Tr, min, n = 2)
g4 = generalize(A, timeInterval = "3 min", tol = 2)
g5 = generalize(A1, n = 3, toPoints = TRUE)
nuest commented 11 years ago

@k2sk8s Just wondering: how do you parse the time interval string?

ghost commented 11 years ago

See http://stat.ethz.ch/R-manual/R-devel/library/base/html/cut.POSIXt.html.

edzer commented 11 years ago

with a format string: as an example from ?strptime:

strptime("20/2/06 11:16:16.683", "%d/%m/%y %H:%M:%OS")

but this is an issue (still) outside spacetime.

nuest commented 11 years ago

@k2sk8s Thanks!