View source: R/data_prep_all.R
data_prep_all | R Documentation |
Prepare the dataset: convert to thousands when needed, restrict to individuals present at least n_min_years, remove outliers and split in train and test sets
data_prep_all( data, n_min_years = 5, normalize = TRUE, reduce_mil = FALSE, outliers_custom_cutoff = NULL, split_pct_train = 0.9 )
data |
A data.frame: the full dataset |
n_min_years |
An integer giving the minimal number of years a farm should appeared in the data to be selected |
normalize |
A logical indicating if numerical variables should be normalized |
reduce_mil |
A logical indicating if thousands conversion should be done |
outliers_custom_cutoff |
Threshold to identified outliers |
split_pct_train |
Ratio between train and test data |
A list of data.frame: train and test sets
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.