Learn R Programming

telraamStats (version 1.1.2)

enrich_dates: Enrich traffic data with date informations.

Description

Enrich traffic data with date informations.

Usage

enrich_dates(data)

Value

Same dataframe with 3 additionnal columns : day, weekday and hour.

Arguments

data

Data frame containing a date character column containing date + hour + timezone.

Examples

Run this code
df <- data.frame('date' = c("2022-02-18 08:00:00 CET","2022-02-18 09:00:00 CET"),
  stringsAsFactors = FALSE)
enrich_dates(df)

Run the code above in your browser using DataLab