all_missing_dich: all_missing_dich function

View source: R/calcs.R

all_missing_dichR Documentation

all_missing_dich 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

all_missing_dich(
  vars,
  data,
  allmissyes = 1,
  allmissno = 0,
  sumisna_fun = "is.na"
)

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.