tidy_data: Tidy Dataset for General Use

View source: R/tidy_data.R

tidy_dataR Documentation

Tidy Dataset for General Use

Description

Tidies dataset for general use by correcting variable types, variable names and removing blanks/NAs in response variable.

Usage

tidy_data(data, thresh = 10, retain_names = FALSE, response, quiet = FALSE)

Arguments

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.

Details

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.

Value

A data.table.


Nanoputian628/nano documentation built on Oct. 30, 2023, 3:28 p.m.