create_data_random {explore}R Documentation

Create data random

Description

Random data that can be used for unit-testing or teaching

Usage

create_data_random(
  obs = 1000,
  vars = 10,
  target_name = "target_ind",
  factorise_target = FALSE,
  target1_prob = 0.5,
  add_id = TRUE,
  seed = 123
)

Arguments

obs

Number of observations

vars

Number of variables

target_name

Variable name of target

factorise_target

Should target variable be factorised? (from 0/1 to facotr no/yes)?

target1_prob

Probability that target = 1

add_id

Add an id-variable to data?

seed

Seed for randomization

Details

Variables in dataset:

Target in dataset:

Value

A dataset as tibble

Examples

create_data_random(obs = 100, vars = 5)

[Package explore version 1.3.0 Index]