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:
id = Identifier
var_X = variable containing values between 0 and 100
Target in dataset:
target_ind (may be renamed) = random values (1 = yes, 0 = no)
Value
A dataset as tibble
Examples
create_data_random(obs = 100, vars = 5)
[Package explore version 1.3.1 Index]