makeup helps to format number, character and date values in order to make them human readable.
The main function of this package is makeup()
. It takes a date, number
o character value and returns it into a human readable format
Install the development version of makeup from GitHub with:
# install.packages("devtools")
remotes::install_github("datasketch/makeup")
This is a basic example which shows you how this packages work:
Let´s load makeup
package
library(makeup)
x <- c(1234.56, 432141, 0.12)
makeup(x,
sample = "1,432.1")
#> [1] "1,234.6" "432,141" "0.1"
x <- c("hello", "WoRlD","Hello world")
makeup(x, sample = "down")
#> [1] "hello" "world" "hello world"
makeup(x, sample = "UPPER")
#> [1] "HELLO" "WORLD" "HELLO WORLD"
makeup(x, sample = "Title phrase")
#> [1] "Hello" "World" "Hello world"
makeup(x, sample = "Title Case")
#> [1] "Hello" "World" "Hello World"
x <- as.Date(c("2020-03-05","2020-06-20"))
makeup(x)
#> [1] "3/5/2020" "6/20/2020"
Learn about the many ways to work with formatting dates values in
vignette("working-with-dates")