This function draws a ggplot plot of the number of missings in each column, broken down by a categorical variable from the dataset. A default minimal theme is used, which can be customised as normal for ggplot.

gg_miss_fct(x, fct)

Arguments

x

data.frame

fct

column containing the factor variable to visualise

Value

ggplot object depicting the each variable.

See also

Examples

gg_miss_fct(x = riskfactors, fct = marital)
library(ggplot2) gg_miss_fct(x = riskfactors, fct = marital) + labs(title = "NA in Risk Factors and Marital status")