histNA_byVar: Histogram for NAs

Description Usage Arguments Value Examples

View source: R/histNA_byVar.R

Description

histNA_byVar check the distribution of NAs of certain variable is affected by another variable

Usage

1
histNA_byVar(dat, NAvar, byvar, bin = 30)

Arguments

dat

data frame

NAvar

variable with NAs

byvar

influencing variable

bin

number of bins (default is 30)

Value

two histogram of influencing variable which separated by the presence of NAs in the NAvar

Examples

1
2
3
4
dat <- iris
dat[dat$Species == "setosa", "Sepal.Length"] <- NA
#indicate right-tailed missingness
histNA_byVar(dat, Sepal.Length, Sepal.Width)

tengku-hanis/niceFunction documentation built on Oct. 27, 2021, 7:41 a.m.