tidy_data | R Documentation |
Tidies dataset for general use by correcting variable types, variable names and removing blanks/NAs in response variable.
tidy_data(data, thresh = 10, retain_names = FALSE, response, quiet = FALSE)
data |
dataset to be tidied. |
thresh |
a numeric. Threshold for the maximum unique levels of a numeric variables to be converted as factor type. |
retain_names |
a logical. Whether to retain original variable names. |
response |
a numeric. Response variable to be used in modelling. |
This function tidies dataset for general use by: correcting variable types, correcting variable names and removing blanks/NAs in response variable. The function returns the tidied data as a data.table.
For further data cleaning in preparation for modelling, please see the data_prep
function which provides more extensive and comprehensive pre-processing.
A data.table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.