| time2season | R Documentation | 
This function transforms a character vector of Dates or DateTimes into a character vector of seasons (summer, winter, autumn, spring), depending on the value of type:  
When type=default
-) winter = DJF: December, January, February   
              
-) spring = MAM: March, April, May             
             
-) summer = JJA: June, July, August            
            
-) autumn = SON: September, October, November  
When type=FrenchPolynesia
-) winter = DJFM: December, January, February, March  
              
-) spring = AM  : April, May                          
             
-) summer = JJAS: June, July, August, September       
            
-) autumn = ON  : October, November
time2season(x, out.fmt = "months", type="default")
| x | vector with the dates that have to be transformed. class(x) must be Date | 
| out.fmt | character, indicating the format of the output seasons. Possible values are:  | 
| type | character, indicating which weather seasons will be used for computing the output. Possible values are:  | 
character vector with the weather season to which each date in x belongs
Weather seasons corresponding to French Polynesia were defined following a comment from Lydie Sichoix
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
dm2seasonal, seasonalfunction, extract, dip, mip
## Sequence of daily dates between "1961-01-01" and "1961-12-31"
t <- dip("1961-01-01", "1961-12-31")
time2season(t)
## Sequence of monthly dates between "1961-01-01" and "1961-12-31"
t <- mip("1961-01-01", "1961-12-31")
time2season(t)
time2season(t, out.fmt="seasons")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.