tripGrid {trip} | R Documentation |
Create a grid of time spent from an object of class trip
by approximating
the time between locations for separate trip events.
tripGrid(x, grid = NULL, method = "count", dur = NULL, ...) interpequal(x, dur = NULL, quiet = FALSE) countPoints(x, dur = 1, grid = NULL) kdePoints(x, h = NULL, grid =NULL, resetTime = TRUE, ...)
x |
object of class trip |
grid |
GridTopology - will be generated automatically if NULL |
method |
name of method for quantifying time spent, see Details |
... |
other arguments passed to interpequal
or kdePoints |
dur |
The "dur"ation of time used to interpolate between available locations (see Details) |
quiet |
logical - report on difference between time summed and time in trip? |
h |
numeric vector of two elements specifying bandwidth for kernel density |
resetTime |
logical - reset the values of the kde grid to match the sum of the total time? |
The intention is for tripGrid
to be used, rather than the underlying functions
for interpolation or gridding.
Trip locations are first interpolated, based on an equal-time spacing between
records. These interpolated points are then "binned" to a grid of cells. The
time spacing is specified by the "dur"ation argument to interpequal
in
seconds (i.e. dur = 3600
is used for 1 hour). Shorter time periods will
require longer computation with a closer approximation to the total time spent in
the gridded result.
Currently there are methods "count" and "kde" for quantifying time spent, corresponding to the functions "countPoints" and "kdePoints". "kde" uses kernel density to smooth the locations, "count" simply counts the points falling in a grid cell.
tripGrid
returns an object of class SpatialGridDataFrame
, with one
column "z" containing the time spent in each cell (usually assumed to be in hours).
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~