Skip to contents

This function drops all the empty lines and columns from the specified data frame, i.e. all the rows and columns that contain only NAs.

Usage

dropEmpty(dataframe)

Arguments

dataframe

data.frame. The data frame from which to remove the empty lines and columns.

Value

The provided data frame without empty lines and columns and all the types transformed to string.

Examples

# The first row is going to be dropped.
irisTest_ <- iris
irisTest_[1, ] <- NA
irisTestDropped <- dropEmpty(irisTest_)

# The Species column is going to be dropped.
irisTest_ <- iris
irisTest_$Test <- NA
irisTestDropped <- dropEmpty(irisTest_)