Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jbkunst/yyyymm

yyyymm
https://github.com/jbkunst/yyyymm

Last synced: 2 months ago
JSON representation

yyyymm

Awesome Lists containing this project

README

        

---
output: github_document
---

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

# yyyymm

[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![Codecov test coverage](https://codecov.io/gh/jbkunst/yyyymm/branch/master/graph/badge.svg)](https://codecov.io/gh/jbkunst/yyyymm/branch/master)
[![R build status](https://github.com/jbkunst/yyyymm/workflows/R-CMD-check/badge.svg)](https://github.com/jbkunst/yyyymm/actions?workflow=R-CMD-check)
[![R-CMD-check](https://github.com/jbkunst/yyyymm/workflows/R-CMD-check/badge.svg)](https://github.com/jbkunst/yyyymm/actions)

The goal of `yyyymm::` is to make life easier with period format.

## Installation

``` r
source("https://install-github.me/jbkunst/yyyymm")
```

## Some Examples

This is a basic example which shows you how to solve a common problem:

```{r}
library(yyyymm)
ym_to_date(ym = c(200902, 201912), day = 1)
```

Get month differences:

```{r}
ym_diff(ym = c(200902, 201912), ym2 = c(200901, 201712))

ym_add_months(c(200902, 201912), months = c(1, -12))
```

## Code of Conduct

Please note that `yyyymm::` project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.