getSeason: Get season from date

View source: R/getSeason.R

getSeasonR Documentation

Get season from date

Description

Get the season name out of a date

Usage

getSeason(x, seasonlab = c("Winter", "Spring", "Summer", "Fall"))

Arguments

x

a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, or fts object..

seasonlab

Season labels, concatenated strings with 4 seasons, default c("Winter","Spring","Summer","Fall")

Value

Returns the corresponding season.

Examples

x <- as.Date("2019-04-01")
getSeason(x) #"Spring"

x <- as.Date("2019-04-01")
getSeason(x, seasonlab = c("Winter","Frühling","Sommer","Herbst")) #"Frühling"

hslu-ige-laes/redutils documentation built on July 6, 2024, 12:45 a.m.