Description Usage Arguments Value Author(s) See Also Examples
Extracts from a zoo object all the values belonging to a given month, year or weather season.
1 2 3 4 5 6 7 |
x |
zoo object |
trgt |
numeric or character indicating the elements to extract from |
... |
further arguments passed to or from other methods |
a zoo object with the extracted values.
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
time2season
, seasonalfunction
, daily2annual
, daily2monthly
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ### Loading temperature data ##
data(SanMartinoPPts)
x <- SanMartinoPPts
## Extracting all the values belonging to February (FEB=2)
extract(x, trgt=2)
## Extracting all the values belonging to February (FEB=2) and April (APR=4)
extract(x, trgt=c(2,4))
## Extracting all the values belonging to the year 1970
extract(x, trgt=1970)
## Extracting all the values belonging to the years 1970 and 1972
extract(x, trgt=c(1970,1972))
## Extracting all the values belonging to the autumn
extract(x, trgt="SON")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.