View source: R/generate_fake_data.R
| generate_fake_data | R Documentation |
Generate Fake Data from Real Dataset Structure
generate_fake_data(
data,
n = 30,
category_mode = c("preserve", "generic", "custom"),
numeric_mode = c("range", "distribution"),
column_mode = c("keep", "generic", "custom"),
custom_levels = NULL,
custom_names = NULL,
seed = NULL,
verbose = FALSE,
sensitive = NULL,
sensitive_detect = TRUE,
sensitive_strategy = c("fake", "drop"),
normalize = TRUE
)
data |
A tabular object; will be coerced via |
n |
Rows to generate (default 30). |
category_mode |
One of "preserve","generic","custom".
|
numeric_mode |
One of "range","distribution".
|
column_mode |
One of "keep","generic","custom".
|
custom_levels |
optional named list of allowed levels per column (for |
custom_names |
optional named character vector old->new (for
|
seed |
Optional RNG seed. |
verbose |
Logical; print progress. |
sensitive |
Optional character vector of original column names to treat as sensitive. |
sensitive_detect |
Logical; auto-detect common sensitive columns by name. |
sensitive_strategy |
One of "fake","drop". Only applied if any sensitive columns exist. |
normalize |
Logical; lightly normalize inputs (trim, %→numeric, short date-times→POSIXct). |
A data.frame of n rows with attributes:
name_map (named chr: original -> output)
column_mode (chr)
sensitive_columns (chr; original names)
dropped_columns (chr; original names that were dropped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.