Learn R Programming

charlatan (version 0.6.1)

ch_generate: Generate a fake dataset

Description

Generate a fake dataset

Usage

ch_generate(..., n = 10, locale = NULL)

Arguments

...

columns to include. must be in the allowed set. See Allowed column names below. Three default columns are included (name, job, phone_number) if nothing is specified - but are overridden by any input.

n

(integer) number of things to get, any non-negative integer

locale

(character) the locale to use. options: only supported for data types that have locale support, See each data provider for details.

Allowed column names

  • name (default included)

  • job (default included)

  • phone_number (default included)

  • currency

  • color_name

  • rgb_color

  • rgb_css_color

Examples

Run this code
ch_generate()
ch_generate(n = 1)
ch_generate(n = 100)

ch_generate("job")
ch_generate("job", "name")
ch_generate("job", "color_name")

# locale
ch_generate(locale = "en_US")
ch_generate(locale = "fr_FR")
ch_generate(locale = "fr_CH")

Run the code above in your browser using DataLab