date_split: Add columns that split date into constituent parts

View source: R/transform.R

date_splitR Documentation

Add columns that split date into constituent parts

Description

Splits the date into day, month and year columns as well as the ISO week and adds all four columns. Also add ISO year and week in YYYY-WxX format, because teden and leto are not enough tu unambiguously determine the correct iso week. Then also adds the "Equivalent last year" or ELY week, which is the one exactly 52 weeks ago. WHich is the simplest way to do y-o-y stuff I believe. For convenienve adds a column with the year-month in YYYY-MM format and the "Equivalent last year" for easy y-o-y calculations

Usage

date_split(df)

Arguments

df

data frame output of import functions (add link)

Value

data frame with 8 more columns than before


majazaloznik/ddvR documentation built on Feb. 13, 2025, 12:32 p.m.