histMiss(x, delimiter = NULL, pos = 1, selection = c("any","all"),
breaks = "Sturges", right = TRUE, col = c("skyblue","red",
"skyblue4","red4","orange","orange4"), border = NULL,
main = NULL, sub = NULL, xlab = NULL, ylab = NULL, axes = TRUE,
only.miss = TRUE, miss.labels = axes, interactive = TRUE, ...)
data.frame
.x
needs
to have colnames
). If given, it is used to determine the
corx
are used for
highlighting."any"
(highlighting of missing/imputed values in any of the additional
variables) and hist
), or a numeric value giving
the number of cells.TRUE
, the histogram cells are
right-closed (left-open) intervals.border=NA
to omit borders.TRUE
, the missing/imputed values in the first
variable are visualized by a single bar. Otherwise, a small barplot
is drawn on the right hand side (see only.miss=TRUE
, the missing/imputed values in the variable of interest
are visualized by one bar on the right hand side. If additional variables
are supplied, this bar is again split into two parts according to
missingness/number of imputed missings in the additional variables.
Otherwise, a small barplot consisting of two bars is drawn on the right
hand side. The first bar corresponds to observed values in the variable
of interest and the second bar to missing/imputed values. Since these two bars are
not on the same scale as the main barplot, a second y-axis is
plotted on the right (if axes=TRUE
). Each of the two bars are
again split into two parts according to missingness/number of imputed missings in the additional
variables. Note that this display does not make sense if only one
variable is supplied, therefore only.miss
is ignored in that case.
If interactive=TRUE
, clicking in the left margin of the plot
results in switching to the previous variable and clicking in the right
margin results in switching to the next variable. Clicking anywhere
else on the graphics device quits the interactive session. When
switching to a categorical variable, a barplot is produced rather than
a histogram.spineMiss
, barMiss
data(tao, package = "VIM")
## for missing values
x <- tao[, c("Air.Temp", "Humidity")]
histMiss(x)
histMiss(x, only.miss = FALSE)
## for imputed values
x_IMPUTED <- kNN(tao[, c("Air.Temp", "Humidity")])
histMiss(x_IMPUTED, delimiter = "_imp")
histMiss(x_IMPUTED, delimiter = "_imp", only.miss = FALSE)
Run the code above in your browser using DataLab