slice: Location Density Estimates

Description Usage Arguments Details Value

Description

Generate density estimates for time slices of a trip

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
slice(slices, k, mcmc = slices$mcmc, grid = slices$grid,
  weights = slices$weights, method = slices$method,
  bandwidth = slices$bandwidth, chains = NULL)

slices(type = c("primary", "intermediate"), breaks = NULL, mcmc = NULL,
  grid = raster(), weights = NULL, method = c("hist", "kde"),
  bandwidth = 0, include.lowest = TRUE, right = FALSE)

sliceInterval(slices, k, mcmc = slices$mcmc)

sliceIndices(slices, mcmc = slices$mcmc)

Arguments

slices

an object generated by slices

k

the index of the time slice to bin.

mcmc

object generated by generated by estelleMetropolis or stellaMetropolis.

grid

raster object that defines the sampling grid.

weights

weights for each location.

method

return a kernel density estimate ("kde") or simple histogram ("hist")?

bandwidth

bandwidth of the kernel density estimator.

chains

NULL or the subset of chains to bin.

type

construct density rasters for primary (x) or intermediate (z) locations

breaks

NULL, or a specification suitable for cut.POSIXt to define the time slices to bin.

include.lowest

parameter to cut.POSIXt.

right

parameter to cut.POSIXt.

Details

These functions divide a trip into time slices, and generate location density estimates for each time slice.

The slices function defines the slices into which the trip is divided, and whether density estimates are generated for the primary or intermediate locations. If breaks is NULL, each location forms a separate time slice, otherwise breaks divides the trip into time slices in the same style as cut.POSIXt. A default set of samples and a raster defining the spatial grid may also be specified.

The slice function generates a density estimate for a time slice, sliceInterval returns the corresponding time interval, and sliceIndices returns the indices that will yield non null raster.

Value

slice returns the locations for time slice of the track binned into a raster, slices returns a slices object that defines the time slices into which to bin, sliceInterval returns the time interval spanned by a slice, and sliceIndices returns the valid set of indices that will yield a raster.


KateGoodenough/RoL-SGAT documentation built on June 11, 2019, 1:29 p.m.