powered by
Add indicator columns to a data.frame showing the pattern of missingness.
miss_ind(data, prefix = "miss_")
A numeric vector or array.
A string used to name the indicator variables..
An augmented data.frame with indicators for missingness patterns.
# NOT RUN { data <- data.frame(cbind(rnorm(10), runif(10))) data[sample(nrow(data), 3), 1] <- NA data[sample(nrow(data), 4), 2] <- NA data <- miss_ind(data) # }
Run the code above in your browser using DataLab