lubridate

Make working with dates in R just that little bit easier

https://github.com/tidyverse/lubridate

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    9 of 109 committers (8.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.3%) to scientific vocabulary

Keywords

date date-time r

Keywords from Contributors

data-manipulation grammar rmarkdown tidy-data package-creation pandoc ropensci travis-ci latex curl
Last synced: 6 months ago · JSON representation

Repository

Make working with dates in R just that little bit easier

Basic Info
Statistics
  • Stars: 773
  • Watchers: 46
  • Forks: 211
  • Open Issues: 110
  • Releases: 15
Topics
date date-time r
Created almost 17 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners Support

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures"
)
```

# lubridate 


[![CRAN version](http://www.r-pkg.org/badges/version/lubridate)](https://cran.r-project.org/package=lubridate)
[![R build status](https://github.com/tidyverse/lubridate/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/lubridate/actions)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/lubridate)](https://cran.r-project.org/package=lubridate)
[![R-CMD-check](https://github.com/tidyverse/lubridate/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/tidyverse/lubridate/actions/workflows/R-CMD-check.yaml)


## Overview

Date-time data can be frustrating to work with in R. R commands for date-times are generally unintuitive and change depending on the type of date-time object being used. Moreover, the methods we use with date-times must be robust to time zones, leap days, daylight savings times, and other time related quirks, and R lacks these capabilities in some situations. Lubridate makes it easier to do the things R does with date-times and possible to do the things R does not.

If you are new to lubridate, the best place to start is the
[date and times chapter](https://r4ds.hadley.nz/datetimes.html) in R
for data science.


## Installation

```{r, eval = FALSE}
# The easiest way to get lubridate is to install the whole tidyverse:
install.packages("tidyverse")

# Alternatively, install just lubridate:
install.packages("lubridate")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/lubridate")
```

## Cheatsheet



## Features

```{r}
library(lubridate, warn.conflicts = FALSE)
```

*   Easy and fast parsing of date-times: `ymd()`, `ymd_hms`, `dmy()`, `dmy_hms`,
    `mdy()`, ...

    ```{r}
    ymd(20101215)
    mdy("4/1/17")
    ```

*   Simple functions to get and set components of a date-time, such as `year()`,
    `month()`, `mday()`, `hour()`, `minute()` and `second()`:

    ```{r}
    bday <- dmy("14/10/1979")
    month(bday)
    wday(bday, label = TRUE)

    year(bday) <- 2016
    wday(bday, label = TRUE)
    ```

*   Helper functions for handling time zones: `with_tz()`, `force_tz()`

    ```{r}
    time <- ymd_hms("2010-12-13 15:30:30")
    time

    # Changes printing
    with_tz(time, "America/Chicago")

    # Changes time
    force_tz(time, "America/Chicago")
    ```

Lubridate also expands the type of mathematical operations that can be performed with date-time objects. It introduces three new time span classes borrowed from https://www.joda.org.

* `durations`, which measure the exact amount of time between two points

* `periods`, which accurately track clock times despite leap years, leap
  seconds, and day light savings time

* `intervals`, a protean summary of the time information between two points

## Code of Conduct

Please note that the lubridate project is released with a [Contributor Code of Conduct](https://lubridate.tidyverse.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

Owner

  • Name: tidyverse
  • Login: tidyverse
  • Kind: organization

The tidyverse is a collection of R packages that share common principles and are designed to work together seamlessly

GitHub Events

Total
  • Issues event: 29
  • Watch event: 39
  • Issue comment event: 36
  • Push event: 15
  • Pull request event: 11
  • Fork event: 7
Last Year
  • Issues event: 29
  • Watch event: 39
  • Issue comment event: 36
  • Push event: 15
  • Pull request event: 11
  • Fork event: 7

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 1,771
  • Total Committers: 109
  • Avg Commits per committer: 16.248
  • Development Distribution Score (DDS): 0.579
Past Year
  • Commits: 14
  • Committers: 6
  • Avg Commits per committer: 2.333
  • Development Distribution Score (DDS): 0.429
Top Committers
Name Email Commits
Vitalie Spinu s****t@g****m 746
garrettgman g****d@g****m 569
hadley h****m@g****m 219
DavisVaughan d****s@r****m 32
ijlyttle i****e@s****m 13
Mara Averick m****k@g****m 10
vitalie v****u@a****m 8
Imanuel Costigan i****n@m****m 8
Michael Chirico c****m@g****m 6
Jason Law j****w@g****m 6
Jim Hester j****r@g****m 5
Joe Thorley j****e@p****a 4
Joseph j****h@l****t 4
Lorenz Walthert l****t@i****m 4
Sushmita V Gopalan s****n@g****m 4
dougmitarotonda d****a@g****m 4
Kirill Müller k****r@i****h 4
Will Beasley w****y@h****m 3
Tom Cardoso t****o@g****m 3
Kirill Müller k****r@m****g 3
Dana Seidel d****l@b****u 3
Christophe Dervieux c****x@g****m 3
Bill Denney w****y@h****m 3
Albert Cheng a****g@g****m 3
C.DERVIEUX c****x@r****m 3
Tim Goodman t****d@m****m 3
Tom Johnson t****n@u****u 3
Trevor L Davis t****s@g****m 2
Stéphane Guillou s****u@m****g 2
Sergio Oller s****r@g****m 2
and 79 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 163
  • Total pull requests: 32
  • Average time to close issues: 9 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 146
  • Total pull request authors: 23
  • Average comments per issue: 2.77
  • Average comments per pull request: 1.19
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 19
  • Pull requests: 12
  • Average time to close issues: 9 days
  • Average time to close pull requests: about 1 month
  • Issue authors: 19
  • Pull request authors: 7
  • Average comments per issue: 0.47
  • Average comments per pull request: 0.83
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • DavisVaughan (5)
  • dominicroye (3)
  • vspinu (2)
  • djbirke (2)
  • keesdeschepper (2)
  • mkoohafkan (2)
  • hadley (2)
  • ShanikaLW (2)
  • Mkranj (2)
  • brunj7 (2)
  • MichaelChirico (2)
  • ramiromagno (2)
  • fk506cni (1)
  • nunotexbsd (1)
  • avsdev-cw (1)
Pull Request Authors
  • DavisVaughan (3)
  • hersheyk (2)
  • d-morrison (2)
  • erikerhardt (2)
  • MichaelChirico (2)
  • GegznaV (2)
  • m-muecke (2)
  • gaborcsardi (2)
  • jack-davison (2)
  • mikmart (2)
  • guslipkin (2)
  • williamlai2 (2)
  • jaganmn (1)
  • vspinu (1)
  • sushmitavgopalan16 (1)
Top Labels
Issue Labels
bug (20) clock (12) parser :carrot: (9) timechange :clock11: (9) feature (7) rewrite (4) timeparse (3) refactoring (1) documentation (1) localisation (1) reprex (1)
Pull Request Labels
timechange :clock11: (1)

Packages

  • Total packages: 3
  • Total downloads:
    • cran 965,138 last-month
  • Total docker downloads: 46,931,810
  • Total dependent packages: 992
    (may contain duplicates)
  • Total dependent repositories: 5,129
    (may contain duplicates)
  • Total versions: 64
  • Total maintainers: 1
cran.r-project.org: lubridate

Make Dealing with Dates a Little Easier

  • Versions: 32
  • Dependent Packages: 937
  • Dependent Repositories: 5,070
  • Downloads: 965,138 Last month
  • Docker Downloads: 46,931,810
Rankings
Dependent repos count: 0.1%
Dependent packages count: 0.1%
Downloads: 0.2%
Forks count: 0.3%
Stargazers count: 0.5%
Average: 3.1%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-lubridate
  • Versions: 9
  • Dependent Packages: 55
  • Dependent Repositories: 59
Rankings
Dependent packages count: 1.4%
Dependent repos count: 4.6%
Average: 8.4%
Forks count: 12.6%
Stargazers count: 15.2%
Last synced: 6 months ago
proxy.golang.org: github.com/tidyverse/lubridate
  • Versions: 23
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2 depends
  • methods * depends
  • chron * enhances
  • timeDate * enhances
  • tis * enhances
  • zoo * enhances
  • generics * imports
  • covr * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests
  • vctrs >= 0.4.1 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action 4.1.4 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/pr-fetch v2 composite
  • r-lib/actions/pr-push v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite