utlede_tidsvariabler: Add tidsvariabler

View source: R/utlede_variabler.R

utlede_tidsvariablerR Documentation

Add tidsvariabler

Description

Add variables aar, maaned_nr (numerical month) and maaned (year + month) in data set based in dato_pros.

Usage

utlede_tidsvariabler(df)

Arguments

df

data.frame with ablanor-data. Must contain dato_pros.

Value

Returns df with 3 new columns

Examples

 df <- data.frame(
dato_pros = as.Date(c("2021-10-05", "1998-01-16", "2020-07-07"),
                    format = "%Y-%m-%d"))
ablanor::utlede_tidsvariabler(df)

Rapporteket/ablanor documentation built on Feb. 27, 2025, 8:26 p.m.