Learn R Programming

healthyR.ai (version 0.1.0)

hai_skewed_features: Get Skewed Feature Columns

Description

Takes in a data.frame/tibble and returns a vector of names of the columns that are skewed.

Usage

hai_skewed_features(.data, .threshold = 0.6, .drop_keys = NULL)

Value

A character vector of column names that are skewed.

Arguments

.data

The data.frame/tibble you are passing in.

.threshold

A level of skewness that indicates where you feel a column should be considered skewed.

.drop_keys

A c() character vector of columns you do not want passed to the function.

Author

Steven P. Sandeson II, MPH

Details

Takes in a data.frame/tibble and returns a vector of names of the skewed columns. There are two other parameters. The first is the .threshold parameter that is set to the level of skewness you want in order to consider the column too skewed. The second is .drop_keys, these are columns you don't want to be considered for whatever reason in the skewness calculation.

Examples

Run this code
hai_skewed_features(mtcars)
hai_skewed_features(mtcars, .drop_keys = c("mpg", "hp"))
hai_skewed_features(mtcars, .drop_keys = "hp")

Run the code above in your browser using DataLab