if (FALSE) {
file <- system.file("external/ndvi", package="rts")
ndvi <- rts(file) # read the ndvi time series from the specified file
n1 <- extract(ndvi,125)# extract the time series values at cell number 125 for all times
n1
plot(n1)
n2 <- extract(ndvi,125,"/20090101") # extract the time series values at cell number 125
# for all times after 2009-01-01
n2
plot(n2)
n3 <- extract(ndvi,125,"200901/") # extract the time series values at cell number 125 for
# all times before 2009-01
n4 <- extract(ndvi,10:20,"2008") # extract the values at cell numbers of 10:20 in
# the year of 2008
n4
}
Run the code above in your browser using DataLab