File: VIM.R

package info (click to toggle)
r-cran-vim 6.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,932 kB
  • sloc: cpp: 141; sh: 12; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (2)
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")