Skip to contents

Returns data frame in which all empty columns (NA in all rows) are removed

Usage

hsDelEmptyCols(dataFrame, FUN = function(x) all(is.na(x)), drop = FALSE)

Arguments

dataFrame

data frame of which empty columns (NA in all rows) are to be removed

FUN

function to be applied to each column to decide whether the column is empty or not. Default: function(x) all(is.na(x))

drop

if TRUE (the default is FALSE) one dimension is dropped (a vector is returned instead of a data frame) in case that all but one columns are removed.

Value

copy of input data frame but with all empty columns removed