Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ellisvalentiner/lubridateExtras
Convenience Functions for Manipulating Datetimes
https://github.com/ellisvalentiner/lubridateExtras
datetime hacktoberfest lubridate r rstats tidy-data
Last synced: 3 months ago
JSON representation
Convenience Functions for Manipulating Datetimes
- Host: GitHub
- URL: https://github.com/ellisvalentiner/lubridateExtras
- Owner: ellisvalentiner
- License: mit
- Created: 2017-08-22T16:37:17.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T15:54:51.000Z (over 2 years ago)
- Last Synced: 2024-06-11T08:49:21.918Z (5 months ago)
- Topics: datetime, hacktoberfest, lubridate, r, rstats, tidy-data
- Language: R
- Homepage: https://ellisvalentiner.github.io/lubridateExtras/
- Size: 823 KB
- Stars: 19
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ellisvalentiner/lubridateExtras - Convenience Functions for Manipulating Datetimes (R)
README
---
output:
github_document:
html_preview: false
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
options(
tibble.print_min = 5,
tibble.print_max = 5
)
Sys.setenv(TZ = "America/Detroit")
```# lubridateExtras
Convenience functions for the lubridate package
[![R build status](https://github.com/ellisvalentiner/lubridateExtras/workflows/R-CMD-check/badge.svg)](https://github.com/ellisvalentiner/lubridateExtras/actions)
[![Coverage]([![codecov](https://codecov.io/gh/ellisvalentiner/lubridateExtras/branch/main/graph/badge.svg?token=G4DGE1C5dG)](https://codecov.io/gh/ellisvalentiner/lubridateExtras))](https://app.codecov.io/gh/ellisvalentiner/lubridateExtras/)## Overview
Lubridate makes it easier to work with date-time data in R and provides new capabilities.
LubridateExtras builds on top of lubridate to provide a number of convenience functions, primarily focused on abstracting patterns in ways that improve code readability and reduce copying and pasting code.## Installation
```{r, eval = FALSE}
# lubridateExtras is not currently on CRAN
# Please install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("ellisvalentiner/lubridateExtras")
```If you encounter a clear bug, please file a minimal reproducible example on [github](https://github.com/ellisvalentiner/lubridateExtras/issues).
## Usage
```{r}
library(lubridateExtras)yesterday()
tomorrow()
days_ago(7) # equivalent to lubridate::today() - lubridate::days(7)
days_hence(7) # equivalent to lubridate::today() + lubridate::days(7)
hms("2017-10-22 15:33:00") # extracts the time-of-day component
```