if (sits_run_examples()) {
# create a data cube from local files
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6.1",
data_dir = data_dir
)
# plot NDVI band of the second date date of the data cube
plot(cube, band = "NDVI", dates = sits_timeline(cube)[1])
}
Run the code above in your browser using DataLab