Subsetting a time series
The main purpose of this function is to extract the values of a specific season in each year. For example, to extract all values for the month of May from a time series.
## S3 method for class 'ts': subset(x, subset=NULL, month=NULL, quarter=NULL, season=NULL, ...)
- a univariate time series to be subsetted
- optional logical expression indicating elements to keep; missing values are taken as false.
- Character list of months to retain. Partial matching on month names used.
- Numeric list of quarters to retain.
- Numeric list of seasons to retain.
- Other arguments, unused.
- If one season per year is extracted, then a ts object is returned with frequency 1. Otherwise, a numeric vector is returned with no ts attributes.
Looks like there are no examples yet.