"aggr".
Summary method for objects of class "aggr".aggr(x, delimiter = NULL, plot = TRUE, ...)
## S3 method for class 'aggr':
plot(x, col = c("skyblue", "red", "orange"), bars = TRUE,
numbers = FALSE, prop = TRUE, combined = FALSE, varheight = FALSE,
only.miss = FALSE, border = par("fg"), sortVars = FALSE,
sortCombs = TRUE, ylabs = NULL, axes = TRUE, labels = axes,
cex.lab = 1.2, cex.axis = par("cex"), cex.numbers = par("cex"),
gap = 4, ...)
## S3 method for class 'aggr':
print(x, digits = NULL, ...)
## S3 method for class 'aggr':
summary(object, ...)data.frame.x needs to have
colnames). If given, it is used to determine the corresponding
iTRUE).FALSE, a separate barplot on the left hand side shows
the amount of missing/imputed values in each variable. If TRUE, a
small version of this barplot is drawnbars is TRUE). This is
useful if most observations are completeborder=NA to omit borders.combined is TRUE, a character string giving
the y-axis label of the combined plot, otherwise a character vector of
length two giving the y-axis labels for the two plots.combined is FALSE, a numeric value giving the
distance between the two plots in margin lines.print.default)."aggr".aggr and TKRaggr, further arguments and
graphical parameters to be passed to plot.aggr. For
plot.aggr, further graphical parameters to be passed down.
aggr, a list of class "aggr" containing the
following components:
- x the data used.
- combinations a character vector representing the combinations of
variables.
- count the frequencies of these combinations.
- percent the percentage of these combinations.
- missings a data.frame containing the amount of
missing/imputed values in each variable.
- tabcomb the indicator matrix for the combinations of variables.
a list of class "summary.aggr" containing the following
components:
- missings a data.frame containing the amount of missing or
imputed values in each variable.
- combinations a data.frame containing a character vector
representing the combinations of variables along with their frequencies and
percentages.labelscombined is FALSE, two separate plots are drawn for the
missing/imputed values in each variable and the combinations of
missing/imputed and non-missing values. The barplot on the left hand side
shows the amount of missing/imputed values in each variable. In the
aggregation plot on the right hand side, all existing combinations of
missing/imputed and non-missing values in the observations are visualized.
Available, missing and imputed data are color coded as given by col.
Additionally, there are two possibilities to represent the frequencies of
occurrence of the different combinations. The first option is to visualize
the proportions or frequencies by a small bar plot and/or numbers. The
second option is to let the cell heights be given by the frequencies of the
corresponding combinations. Furthermore, variables may be sorted by the
number of missing/imputed values and combinations by the frequency of
occurrence to give more power to finding the structure of missing/imputed
values.
If combined is TRUE, a small version of the barplot showing
the amount of missing/imputed values in each variable is drawn on top of the
aggregation plot.
The graphical parameter oma will be set unless supplied as an
argument.print.aggr, summary.aggr
aggr
print.summary.aggr, aggrdata(sleep, package="VIM")
## for missing values
a <- aggr(sleep)
a
summary(a)
## for imputed values
sleep_IMPUTED <- kNN(sleep)
a <- aggr(sleep_IMPUTED, delimiter="_imp")
a
summary(a)
data(sleep, package = "VIM")
a <- aggr(sleep, plot=FALSE)
a
data(sleep, package = "VIM")
summary(aggr(sleep, plot=FALSE))Run the code above in your browser using DataLab