charlatan

knitr::opts_chunk$set(
  comment = "#>",
  collapse = TRUE,
  warning = FALSE,
  message = FALSE
)

Project Status: Active – The project has reached a stable, usable state and is being actively developed. R-check cran checks cran status rstudio mirror downloads

charlatan makes fake data, inspired from and borrowing some code from Python's faker (https://github.com/joke2k/faker)

Make fake data for:

Possible use cases for charlatan:

Reasons to use charlatan:

Installation

cran version

install.packages("charlatan")

dev version

remotes::install_github("ropensci/charlatan")
library("charlatan")
set.seed(12345)

high level function

... for all fake data operations

x <- fraudster()
x$job()
x$name()
x$color_name()

locale support

Adding more locales through time, e.g.,

Locale support for job data

ch_job(locale = "en_US", n = 3)
ch_job(locale = "fr_FR", n = 3)
ch_job(locale = "hr_HR", n = 3)
ch_job(locale = "uk_UA", n = 3)
ch_job(locale = "zh_TW", n = 3)

For colors:

ch_color_name(locale = "en_US", n = 3)
ch_color_name(locale = "uk_UA", n = 3)

More coming soon ...

generate a dataset

ch_generate()
ch_generate("job", "phone_number", n = 30)

person name

ch_name()
ch_name(10)

phone number

ch_phone_number()
ch_phone_number(10)

job

ch_job()
ch_job(10)

credit cards

ch_credit_card_provider()
ch_credit_card_provider(n = 4)
ch_credit_card_number()
ch_credit_card_number(n = 10)
ch_credit_card_security_code()
ch_credit_card_security_code(10)

Usage in the wild

Contributors

If you would like to contribute, see CONTRIBUTING (on github)

similar art

Meta



ropenscilabs/charlatan documentation built on Oct. 25, 2023, 12:26 a.m.