random_data_frame | R Documentation |
Generate a random data frame from given configuration
random_data_frame(configuration, size)
configuration |
list, a configuration of columns with all arguments required by vector generator passed as sublists of sublist "columns". Column can be also generated with custom function. Pass "custom_column" as column type and function (or function name) as custom_column_generator. Column generator has to accept argument size and return a vector of this size. Third option is to pass an expression that involves existing columns. This can be a simple one, or a call of an existing function. |
size |
integer, number of rows to generate. |
data.frame
conf <- list( columns = list( first_column = list( type = "string", length = 3 ), second_column = list( type = "integer", max = 10 ), third_column = list( type = "calculated", formula = "second_column * 2" ) ) ) random_data_frame(conf, size = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.