File: marginmatrix.Rd

package info (click to toggle)
r-cran-vim 6.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,556 kB
  • sloc: cpp: 141; sh: 12; makefile: 2
file content (98 lines) | stat: -rw-r--r-- 3,456 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/marginmatrix.R
\name{marginmatrix}
\alias{marginmatrix}
\title{Marginplot Matrix}
\usage{
marginmatrix(
  x,
  delimiter = NULL,
  col = c("skyblue", "red", "red4", "orange", "orange4"),
  alpha = NULL,
  ...
)
}
\arguments{
\item{x}{a matrix or \code{data.frame}.}

\item{delimiter}{a character-vector to distinguish between variables and
imputation-indices for imputed variables (therefore, \code{x} needs to have
\code{\link[=colnames]{colnames()}}). If given, it is used to determine the corresponding
imputation-index for any imputed variable (a logical-vector indicating which
values of the variable have been imputed). If such imputation-indices are
found, they are used for highlighting and the colors are adjusted according
to the given colors for imputed variables (see \code{col}).}

\item{col}{a vector of length five giving the colors to be used in the
marginplots in the off-diagonal panels.  The first color is used for the
scatterplot and the boxplots for the available data, the second/fourth color
for the univariate scatterplots and boxplots for the missing/imputed values
in one variable, and the third/fifth color for the frequency of
missing/imputed values in both variables (see \sQuote{Details}).  If only
one color is supplied, it is used for the bivariate and univariate
scatterplots and the boxplots for missing/imputed values in one variable,
whereas the boxplots for the available data are transparent.  Else if two
colors are supplied, the second one is recycled.}

\item{alpha}{a numeric value between 0 and 1 giving the level of
transparency of the colors, or \code{NULL}.  This can be used to prevent
overplotting.}

\item{\dots}{further arguments and graphical parameters to be passed to
\code{\link[=pairsVIM]{pairsVIM()}} and \code{\link[=marginplot]{marginplot()}}.  \code{par("oma")} will
be set appropriately unless supplied (see \code{\link[graphics:par]{graphics::par()}}).}
}
\description{
Create a scatterplot matrix with information about missing/imputed values in
the plot margins of each panel.
}
\details{
\code{marginmatrix} uses \code{\link[=pairsVIM]{pairsVIM()}} with a panel function based
on \code{\link[=marginplot]{marginplot()}}.

The graphical parameter \code{oma} will be set unless supplied as an
argument.
}
\examples{

data(sleep, package = "VIM")
## for missing values
x <- sleep[, 1:5]
x[,c(1,2,4)] <- log10(x[,c(1,2,4)])
marginmatrix(x)

## for imputed values
x_imp <- kNN(sleep[, 1:5])
x_imp[,c(1,2,4)] <- log10(x_imp[,c(1,2,4)])
marginmatrix(x_imp, delimiter = "_imp")

}
\references{
M. Templ, A. Alfons, P. Filzmoser (2012) Exploring incomplete
data using visualization tools.  \emph{Journal of Advances in Data Analysis
and Classification}, Online first. DOI: 10.1007/s11634-011-0102-y.
}
\seealso{
\code{\link[=marginplot]{marginplot()}}, \code{\link[=pairsVIM]{pairsVIM()}},
\code{\link[=scattmatrixMiss]{scattmatrixMiss()}}

Other plotting functions: 
\code{\link{aggr}()},
\code{\link{barMiss}()},
\code{\link{histMiss}()},
\code{\link{marginplot}()},
\code{\link{matrixplot}()},
\code{\link{mosaicMiss}()},
\code{\link{pairsVIM}()},
\code{\link{parcoordMiss}()},
\code{\link{pbox}()},
\code{\link{scattJitt}()},
\code{\link{scattMiss}()},
\code{\link{scattmatrixMiss}()},
\code{\link{spineMiss}()}
}
\author{
Andreas Alfons, modifications by Bernd Prantner
}
\concept{plotting functions}
\keyword{hplot}