plotxna {rchemo}R Documentation

Plotting Missing Data in a Matrix

Description

Plot the location of missing data in a matrix.

Usage

plotxna(X, pch = 16, col = "red", grid = FALSE, asp = 0, ...)

Arguments

X

A data set (n x p).

pch

Type of point. See points.

col

A color defining the color of the points.

grid

Logical. If TRUE, a grid is plotted for representing the matrix rows an columns. Default to FALSE.

asp

Scalar. Giving the aspect ratio y/x. The value asp = 0 is the default in plot.default (no constraints on the ratio). See plot.default.

...

Other arguments to pass in functions plot.

Value

A plot.

Examples


data(octane)
X <- octane$X
n <- nrow(X)
p <- ncol(X)
N <- n * p

s <- sample(1:N, size = 50)
zX <- replace(X, s, NA)
plotxna(zX)
plotxna(zX, grid = TRUE, asp = 0)


[Package rchemo version 0.1-1 Index]