# NOT RUN {
{
require(raster)
#' # read raster data
file <- list.files(system.file('extdata', '', package="rsMove"), 'tc.*tif', full.names=TRUE)
rsStk <- stack(file)
rsStk <- stack(rsStk, rsStk, rsStk) # dummy files for the example
# read movement data
moveData <- read.csv(system.file('extdata', 'konstanz_20130805-20130811.csv', package="rsMove"))
moveData <- SpatialPointsDataFrame(moveData[1:10,1:2], moveData[1:10,], proj4string=crs(rsStk))
# raster dates
rd = seq.Date(as.Date("2012-01-01"), as.Date("2012-12-31"), 45)
# target dates
td = as.Date("2012-04-01")
# interpolate raster data to target dates
i.img <- imgInt(img=rsStk, rd=rd, td=td, bs=c(60,60), xy=moveData)
}
# }
Run the code above in your browser using DataCamp Workspace