Travis-CI Build Status

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

DateTimeWrangler

This R Package converts a DateTime into diff. value such as day of the week, time of day, day of the year, whether the time and day is during working hours, if it is a holiday or national vacation day, etc.

Installation

You can install DateTimeWrangler from github with:

# install.packages("devtools")
devtools::install_github("emillykkejensen/DateTimeWrangler")

Example

To use DateTimeWrangler simply give it a list of datetime values.

library(DateTimeWrangler)

datetimes <- c(as.POSIXct("2018-05-12 12:35:20 CET"),
               as.POSIXct("2018-05-14 10:11:04 CET"),
               as.POSIXct("2018-07-01 04:50:02 CET"),
               as.POSIXct("2018-12-25 18:02:51 CET"))

populated_datetime <- datetime_to_cols(datetimes)
knitr::kable(populated_datetime)


emillykkejensen/DateTimeWrangler documentation built on May 14, 2019, 9:37 a.m.