create_df_rd | R Documentation |
A function to create a dataset containing :
a ID column containing ID from 1 to the size
normally distributed variables (if NULL, no column)
factors variables with the levels given by list input (if NULL, no column)
Booleans with binomial distributions with list input (if NULL, no column)
create_df_rd(
size = 10,
seed = NULL,
numerics = NULL,
booleans = NULL,
categories = NULL
)
size |
Integer, number of profiles to create. |
seed |
Numeric. Seed for reproducibility. If NULL, a seed is randomly created. The default is NA |
numerics |
List. Normally distributed numeric columns. ID are the names and values are either NULL or a vector of length 2 with mean and std. |
booleans |
List. Binomial distributed columns. Keys are the names, values are either NULL or a float which is the probability of True values. |
categories |
List. Multinomial distributed columns. Keys are the names, values are either NULL or a vector of categorical values. The probabilities will be 1/N if a column has N unique values |
data.frame that can be tested by check_format_df
create_df_rd(10,NULL, list("num1" = NULL,"num2" = c(0,1)), list("bool1" = 0.5),list(a = c(1,2,3),b = c("F","M")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.