# NOT RUN {
{
require(raster)
# reference data
data(longMove)
# extract regions
hm <- hotMove(longMove, 0.1, return.shp=TRUE)
# plot shapefile (color by region)
plot(hm$polygons)
# add new information to original shapefile
longMove@data <- cbind(longMove@data, hm$indices)
# derive statistics
hm.region.stats <- hotMoveStats(hm$indices, as.Date(longMove@data$timestamp))
}
# }
Run the code above in your browser using DataLab