Date/DateTime character -> Seasonal character
time2season.Rd
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
Arguments
- 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:
-) seasons => c("winter", "spring", "summer", autumn")
-) months => c("DJF", "MAM", "JJA", SON") or c("DJFM", "AM", "JJAS", ON")- type
character, indicating which weather seasons will be used for computing the output. Possible values are:
-) default => "winter"= Dec, Jan, Feb; "spring"= Mar, Apr, May; "summer"=Jun, Jul, Aug; "autumn"= Sep, Oct, Nov
-) FrenchPolynesia => "winter"= Dec, Jan, Feb, Mar; "spring"= Apr, May; "summer"=Jun, Jul, Aug, Sep; "autumn"= Oct, Nov
Author
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
Note
Weather seasons corresponding to French Polynesia were defined following a comment from Lydie Sichoix