or_pct: or_pct function

View source: R/calcs.R

or_pctR Documentation

or_pct function

Description

given a vector of variable names and a dataset this function will find all of the variables in the vector that are present in the dataset and then of those determine (using sumisna) if all of them are NA.

Usage

or_pct(x, digs = 0, knit = FALSE)

Arguments

vars

vector of variables to evaluate

data

dataset containing the variables

allmissyes

what to return if all of the variables are NA. Default is 1

allmissno

what to return if all of the variables are not NA. Defalt is 0

sumisna_fun

what function to pass to the sumisna function. default is 'is.na'

Examples

all_missing_dich_function()


clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.