if (FALSE) {
file <- system.file("external/ndvi", package="rts")
ndvi <- rts(file) # read the ndvi time series from the specified file
s1 <- subset(ndvi,1:5) # subset the first 5 raster layers into a new raster time series object
s1
plot(s1)
s2 <- subset(ndvi,"/2000") # subset all layers till end of year 2000
s2
plot(s2)
s3 <- subset(ndvi,"2000-01-01/2000-05-31")
s3
plot(s3)
}
Run the code above in your browser using DataLab