Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbkunst/yyyymm
yyyymm
https://github.com/jbkunst/yyyymm
Last synced: 2 months ago
JSON representation
yyyymm
- Host: GitHub
- URL: https://github.com/jbkunst/yyyymm
- Owner: jbkunst
- License: gpl-3.0
- Created: 2019-11-04T21:45:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T06:02:24.000Z (over 2 years ago)
- Last Synced: 2024-10-11T19:13:48.964Z (3 months ago)
- Language: R
- Homepage: https://jkunst.com/yyyymm/
- Size: 979 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - jbkunst/yyyymm - yyyymm (R)
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.