# NOT RUN {
{
require(raster)
# reference data
sprj <- crs("+proj=longlat +ellps=WGS84 +no_defs")
moveData <- read.csv(system.file('extdata', 'latlon_example.csv', package="rsMove"))
moveData <- SpatialPointsDataFrame(moveData[,2:3], moveData, proj4string=sprj)
# sampling without reference grid
ot = strptime(moveData$timestamp, "%Y-%m-%d %H:%M:%S")
output <- sampleMove(xy=moveData, ot=ot, error=7, method='deg')
# compare original vs new samples
plot(moveData, col="black", pch=16)
points(output$x, output$y, col="red", pch=15)
}
# }
Run the code above in your browser using DataLab