create_data_random | R Documentation |
Random data that can be used for unit-testing or teaching
create_data_random(
obs = 1000,
vars = 10,
target_name = "target_ind",
factorise_target = FALSE,
target1_prob = 0.5,
add_id = TRUE,
seed = 123
)
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 |
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)
A dataset as tibble
create_data_random(obs = 100, vars = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.