get_miss_perc: get missing percent within a column of a tibble or a...

View source: R/misc_helpers.R

get_miss_percR Documentation

get missing percent within a column of a tibble or a dataframe

Description

get the percent of observations that are missing in a column of a tibble or dataframe. Can be mapped or future_mapped over multiple columns in a dataframe

Usage

get_miss_perc(data, missing_value, ...)

Arguments

data

is the dataframe or tibble to which the column of interest belongs

missing_value

is the value to be counted as "missing", i.e "NA" or "", or c("NA", NA, "")

...

additional arguments passed

Value

a character string of the missing percentage of miss_col

Examples

## Not run: 
require(tibble)

col1 <- seq(1, 10, 1)
col2 <- c("NA", 5, 7, NA, 41, "NA", 6, 8, "NA", NA)
my_tibble <- tibble(col1 = col1, col2 = col2)
get_miss_perc(my_tibble$col1, missing_value = "NA")

## End(Not run)

tknoch8/helpRs documentation built on May 11, 2022, 9:34 p.m.