A function returns a list with season attributes

create_seasons(season_names, number_of_seasons, months_per_season)

Arguments

season_names
  • a vector of season names

number_of_seasons
  • the number of seasons

months_per_season
  • a vector, where each object is the number of months in each season

Value

season_list a list object containing the seasons, where each season is a nested list with attributes id, name, and months for each season