season_fct | R Documentation |
Creates a factor with the four seasons DJF, SON, MAM, JJA (so to keep the annual order), with the option to define the first season (factor level), from a vector of numeric/integer months.
season_fct(month, first_season = "DJF")
month |
numeric month |
first_season |
character season, which should be the first level (default: "JJA") |
Factor vector of the same length as input.
month <- sample(1:12, 30, replace = TRUE)
month
season_fct(month)
str(season_fct(month))
season_fct(month, first_season = "JJA")
str(season_fct(month, first_season = "JJA"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.