Skip to contents

Write synthetic epidemiology-style data to CSV

Usage

morie_write_synthetic_data(
  path,
  n = 5000L,
  seed = 42L,
  special_code_rate = 0.02,
  profile = c("generic", "morie_legacy"),
  name_map = NULL,
  overwrite = FALSE
)

Arguments

path

Output CSV path.

n

Number of rows.

seed

Random seed.

special_code_rate

Proportion of survey-style missing codes.

profile

Naming profile for output columns.

name_map

Optional custom variable name map.

overwrite

If TRUE, overwrite existing file.

Value

Normalized output path.

Examples

out <- morie_write_synthetic_data(tempfile(fileext = ".csv"), n = 200, seed = 1)
file.exists(out)
#> [1] TRUE