rm_empty_col: Remove empty columns

Description Usage Arguments Details Value Author(s) Examples

View source: R/rm_empty_col.R

Description

This function removes columns filled with NA or 0 from a dataframe.

Usage

1

Arguments

x

A dataframe

Details

This function is mainly used inside other functions, to remove optional variables when they are not opted in.

Value

a dataframe.

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

Examples

1
2
3
4
5
6
7
8
library(forestmangr)
library(dplyr)
data("exfm15")
head(exfm15)

exfm15 %>% 
mutate(emptycol=NA) %>% 
rm_empty_col

forestmangr documentation built on Aug. 16, 2021, 5:08 p.m.