# NOT RUN {
{
require(raster)
# read raster data
file <- list.files(system.file('extdata', '', package="rsMove"), 'ndvi.tif', full.names=TRUE)
r.stk <- stack(file)
r.stk <- stack(r.stk, r.stk, r.stk) # dummy files for the example
# read movement data
data(shortMove)
# raster dates
file.name <- names(r.stk)
r.dates <- as.Date(paste0(substr(file.name, 2, 5), '-',
substr(file.name, 7, 8), '-', substr(file.name, 10, 11)))
# sample dates
obs.dates <- as.Date(shortMove@data$date)
# retrieve remote sensing data for samples
rsQuery <- dataQuery(xy=shortMove, obs.dates=obs.dates,
env.data=r.stk, env.dates=r.dates, time.buffer=c(30,30))
}
# }
Run the code above in your browser using DataLab