cut_seasonyear | R Documentation |
Cut the data in year-season intervals while keeping the seasons together. This means december will be added to the following year.
With label = "year"
only the year will be adjustet.
cut_seasonyear(x, label = c("yearseason", "year"), labels = NULL)
x |
a date-time vector |
label |
choice between |
labels |
forwarded to |
factor of yearseasons
dates <- lubridate::ymd(010101) + months(0:11)
cut_seasonyear(dates)
cut_seasonyear(dates, "year")
# customize season labels
labels = c(
DJF = "winter", JJA = "summer",
MAM = "spring", SON = "autumn"
)
cut_seasonyear(dates, labels = labels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.