https://github.com/jbkunst/yyyymm
yyyymm
https://github.com/jbkunst/yyyymm
Last synced: 11 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T06:02:24.000Z (almost 3 years ago)
- Last Synced: 2025-03-20T13:06:51.362Z (26 days ago)
- Language: R
- Homepage: https://jkunst.com/yyyymm/
- Size: 979 KB
- Stars: 3
- Watchers: 2
- 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
[](https://www.tidyverse.org/lifecycle/#stable)
[](https://codecov.io/gh/jbkunst/yyyymm/branch/master)
[](https://github.com/jbkunst/yyyymm/actions?workflow=R-CMD-check)
[](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.