This function lets the user remove all columns that have some or all values as NAs
This function lets the user remove all rows that have some or all values as NAs
removenacols(df, all = TRUE, ignore = NULL)removenarows(df, all = TRUE)
numericalonly(df, dropnacols = TRUE, logs = FALSE, natransform = NA)
data.frame with removed columns.
data.frame with removed rows.
data.frame with all numerical columns selected.
Data.frame
Boolean. Remove rows which contains ONLY NA values. If set to FALSE, rows which contains at least one NA will be removed
Character vector. Column names to ignore validation.
Boolean. Drop columns with only NA values?
Boolean. Calculate log(x)+1 for numerical columns?
String. "mean" or 0 to impute NA values. If set to NA no calculation will run.
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
formatNum()
,
holidays()
,
impute()
,
left()
,
normalize()
,
ohe_commas()
,
ohse()
,
replaceall()
,
textFeats()
,
textTokenizer()
,
vector2text()
,
year_month()
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
formatNum()
,
holidays()
,
impute()
,
left()
,
normalize()
,
ohe_commas()
,
ohse()
,
replaceall()
,
textFeats()
,
textTokenizer()
,
vector2text()
,
year_month()
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
formatNum()
,
holidays()
,
impute()
,
left()
,
normalize()
,
ohe_commas()
,
ohse()
,
replaceall()
,
textFeats()
,
textTokenizer()
,
vector2text()
,
year_month()
data(dft) # Titanic dataset
str(dft)
numericalonly(dft) %>% head()
numericalonly(dft, natransform = "mean") %>% head()
Run the code above in your browser using DataLab