check_missing: Figure out the variables having missing values

Description Usage Arguments Value Examples

Description

check_missing identifies the variables in the data frame with missing values and returns their variable names.

Usage

1
check_missing(df, spaces = FALSE)

Arguments

The

input to the function is a data frame which is mandatory. The optional parameter is spaces. The code by default takes spaces as FALSE but you can override it to convert spaces to NAs and return the missing value results.

Value

Returns a vector of column names in the data frame which have missing values. If spaces parameter is over-ridden it returns the variables with single spaces and also treats and returns them as NAs as well.

Examples

1
2
zero_var_index <- zero_var(df)
df_without_zerovariance <- df[,-zero_var_index]

yogids/dcntrl documentation built on May 10, 2019, 10:25 a.m.