Remove empty Columns from a Data Frame

removeEmptyColumns(x, drop = FALSE, FUN = function(x) all(is.na(x)),
  dbg = TRUE)

Arguments

x

data frame

drop

if TRUE and only one column remains the column is returned as a vector

FUN

function called on each column to determine if all values in the column are empty. Default: function(x) all(is.na(x))

dbg

if TRUE debug messages are shown

Value

data frame x with empty columns (columns with NA in all rows) being removed

See also