1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.width = 7,
fig.height = 5,
fig.align = "center"
)
## ----setup, message=FALSE, fig.height = 3-------------------------------------
library(VIM)
data(sleep)
a <- aggr(sleep, plot = FALSE)
plot(a, numbers = TRUE, prop = FALSE)
## -----------------------------------------------------------------------------
x <- sleep[, c("Dream", "Sleep")]
marginplot(x)
## -----------------------------------------------------------------------------
x_imputed <- kNN(x)
## -----------------------------------------------------------------------------
marginplot(x_imputed, delimiter = "_imp")
|