Skip to content
Prev 21554 / 29559 Next

Subsetting Raster Time Series

You could use the calc() environment and define your own function where
you create a ts() object and then subset the ts() using window() to your
time period.

f_subset <- function(x) {
 x <- ts(x, start = c(1901, 1), frequency = 12)  # fill in the right values
 sx <- window(x, start = c(?,?), end = c(?,?)) ## fill in the right values
 return(sx)
}
result <- calc(temp, fun = f_subset)


Jan
www.wageningenur.nl/changemonitor
On 26/08/14 11:55, "Srinivas V" <srinivasv at feralindia.org> wrote: