calc_season_fixed: Compute a season index of each year week

View source: R/week.r

calc_season_fixedR Documentation

Compute a season index of each year week

Description

For each week compute the number of the week inside the "season", using an arbitrary start date for the season Based on a fixed date in the year (to take account of the week lag for some years) Conventionnaly we took the first of september of each year as the season's start

Usage

calc_season_fixed(
  inc,
  col.yw = "yw",
  col.stamp = NULL,
  date.start = "09-01",
  calc.index = TRUE
)

Arguments

inc

data.frame() data

col.yw

name of the column containing the yearweek number

col.stamp

name of the column containing the week stamp of each yearweek (@see week_stamp), if not provided compute it

date.start

month-day date to take as the start of each season

calc.index

if TRUE add an index column

Value

inc with 'season.year' (year of the start ) and 'season.index' (index of the week in the season) columns


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.