mdc {mice} | R Documentation |
mdc
returns colors used to distinguish observed, missing and
combined data in plotting. mice.theme
return a partial list of
named objects that can be used as a theme in stripplot
,
bwplot
, densityplot
and xyplot
.
mdc(r="observed", s="symbol", transparent=TRUE, cso = hcl(240,100,40,0.7), csi = hcl(0,100,40,0.7), csc = "gray50", clo = hcl(240,100,40,0.8), cli = hcl(0,100,40,0.8), clc = "gray50") mice.theme(transparent=TRUE, alpha.fill=0.3)
r |
A numerical or character vector. The numbers 1-6 request colors
as follows: 1= |
s |
A character vector containing the strings " |
transparent |
A logical indicating whether alpha-transparancy is
allowed. The default is |
alpha.fill |
A numerical values between 0 and 1 that indicates the default alpha value for fills. |
cso |
The symbol color for the observed data. The default is a transparent blue. |
csi |
The symbol color for the missing or imputed data. The default is a transparent red. |
csc |
The symbol color for the combined observed and imputed data. The default is a grey color. |
clo |
The line color for the observed data. The default is a slightly darker transparent blue. |
cli |
The line color for the missing or imputed data. The default is a slightly darker transparent red. |
clc |
The line color for the combined observed and imputed data. The default is a grey color. |
This function eases consistent use of colors in plots. The default follows the Abayomi convention, which uses blue for observed data, red for missing or imputed data, and black for combined data.
mdc
returns a vector containing color definitions. The length of the output vector is
calculate from the length of r
and s
. Elements of the
input vectors are
repeated if needed. mice.theme
return a named list that can be
used as a theme in the functions in lattice. By default,
the mice.theme()
function sets transparent <- TRUE
if the current device
.Device
supports semi-transparent colors.
Stef van Buuren, sept 2012.
Sarkar, Deepayan (2008) Lattice: Multivariate Data Visualization with R, Springer. http://lmdvr.r-forge.r-project.org/
hcl
,
rgb
,
xyplot.mids
,
xyplot
,
trellis.par.set
# all six colors mdc(1:6) # lines color for observed and missing data mdc(c("obs","mis"), "lin")