select_time: Select specified years

Description Usage Arguments Examples

View source: R/select_time.R

Description

Function to select a range of year from object of class 'NetCDF'.

Usage

1
select_time(x, startyear, endyear)

Arguments

x

object of class 'NetCDF'

startyear

first year to be selected

endyear

last year to be selected

Examples

1
2
3
4
5
6
7
8
xx <- t(rnorm(400) + c(-2, 0,3,1))
attr(xx, 'time') <- seq(1901, by=0.25, length=400)
class(xx) <- 'NetCDF'

## plot all seasons with individual seasons
plot(xx, type='ts', seas=T, col=1, lty=1, lwd=1)
## highlight subset of data
plot(select_time(xx, 1961, 1990), lwd=2, add=T, seas=T)

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.