# NOT RUN {
{
require(rgdal)
require(raster)
require(sp)
# reference data
file <- system.file('extdata', 'latLon_example.shp', package="rsMove")
moveData <- shapefile(file)
# extract regions
hm <- hotMove(xy=moveData, pxr=0.1, shp=TRUE)
# plot shapefile (color by region)
plot(hm$polygons, col=hm$indices)
# add new information to original shapefile
moveData@data <- cbind(moveData@data, hm$indices)
}
# }
Run the code above in your browser using DataLab