
Removes all rows and/or columns from a data.frame or matrix that
are composed entirely of NA
values.
remove_empty(dat, which = c("rows", "cols"), quiet = TRUE)
the input data.frame or matrix.
one of "rows", "cols", or c("rows", "cols")
. Where no
value of which is provided, defaults to removing both empty rows and empty
columns, declaring the behavior with a printed message.
Should messages be suppressed (TRUE
) or printed
(FALSE
) indicating the summary of empty columns or rows removed?
Returns the object without its missing rows or columns.
remove_constant()
for removing
constant columns.
Other remove functions:
remove_constant()
# NOT RUN {
# not run:
# dat %>% remove_empty("rows")
# }
Run the code above in your browser using DataLab