README.md

chi

Functions for CHI numbers

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("graemegowans/chi")

Example

Use pad_chi() to add a leading zero to a 9 character string. Other strings are left alone.

library(chi)
library(tidyverse)
df <- tibble(chi_no = c("123456789", "1234567890", "123"))
df %>% mutate(padded_chi = pad_chi(chi_no))
#> # A tibble: 3 x 2
#>   chi_no     padded_chi
#>   <chr>      <chr>     
#> 1 123456789  0123456789
#> 2 1234567890 1234567890
#> 3 123        123


graemegowans/chi documentation built on Feb. 1, 2020, 12:53 a.m.