Plot density for object of class 'data.frame' using dens_panel
by default.
densplot_data_frame(x, xvar, groups = NULL, facets = NULL,
xlab = metOption("metaplot_xlab_dens", axislabel),
ref = metOption("metaplot_ref_x_dens", metaplot_ref),
ref.col = metOption("metaplot_ref_col_dens", "grey"),
ref.lty = metOption("metaplot_ref_lty_dens", "solid"),
ref.lwd = metOption("metaplot_ref_lwd_dens", 1),
ref.alpha = metOption("metaplot_ref_alpha_dens", 1),
log = metOption("metaplot_log_dens", FALSE),
crit = metOption("metaplot_crit_dens", 1.3),
aspect = metOption("metaplot_aspect_dens", 1),
scales = metOption("metaplot_scales_dens", NULL),
panel = metOption("metaplot_panel_dens", dens_panel),
colors = metOption("metaplot_colors_dens", NULL),
symbols = metOption("metaplot_symbols_dens", NULL),
points = metOption("metaplot_points_dens", TRUE),
lines = metOption("metaplot_lines_dens", TRUE),
fill = metOption("metaplot_fill_dens", FALSE),
space = metOption("metaplot_space_dens", "right"),
key = metOption("metaplot_key_dens", metaplot_key),
as.table = metOption("metaplot_astable_dens", TRUE),
main = metOption("metaplot_main_dens", NULL),
sub = metOption("metaplot_sub_dens", NULL),
settings = metOption("metaplot_settings_dens", NULL),
padding = metOption("metaplot_padding_dens", 1),
gg = metOption("metaplot_gg_dens", FALSE), ...)
data.frame
variable to plot
optional grouping variable
optional conditioning variables
x axis label; can be function(x = x, var = xvar, log = log, ...)
reference line; can be function(x = x, var = xvar, ...) or NULL to suppress
color for reference line(s)
type for reference line(s)
size for reference line(s)
transparency for reference line(s)
whether to log-transform x axis (auto-selected if NA)
if log is NA, log-transform if mean/median ratio for non-missing x is greater than this value (and no negative values)
passed to bwplot
or ggplot; use 'fill', NA, or NULL to calculate automatically
passed to xyplot
or facet_grid
or facet_wrap
(guessed if NULL)
passed to densityplot
replacements for default colors in group order
replacements for default symbols in group order
whether to plot points: logical or alpha, same length as groups
whether to plot lines: logical or alpha, same length as groups
whether to fill curves: logical or alpha, same length as groups (symbol fill color is same as point color)
location of key (right, left, top, bottom)
list: passed to xyplot
as auto.key
or to theme
; can be a function groups name, groups levels, points, lines, space, gg, and … . See metaplot_key
.
passed to xyplot
character, or a function of x, xvar, groups, facets, and log
character, or a function of x, xvar, groups, facets, and log
default parameter settings: a list from which matching elements are passed to lattice (as par.settings) or to ggplot theme() and facet_wrap() or facet_grid(). ncol
and nrow
are used as layout indices for lattice (for homology with facet_wrap).
numeric (will be recycled to length 4) giving plot margins in default units: top, right, bottom, left (in multiples of 5.5 points for ggplot)
logical: whether to generate ggplot
instead of trellis
passed to densityplot
Other univariate plots: dens_panel
,
densplot.data.frame
,
densplot
,
metaplot.data.frame
,
panel.meta_densityplot
Other densplot: densplot.data.frame
,
densplot
Other metaplot: boxplot_data_frame
,
categorical_data_frame
,
corsplom_data_frame
,
metaplot_key
, metaplot
,
scatter_data_frame
,
test_metaplot
# NOT RUN {
densplot_data_frame(Theoph, 'conc', grid = TRUE)
densplot_data_frame(Theoph, 'conc', 'Subject')
densplot_data_frame(Theoph, 'conc', 'Subject',
space = 'top', columns = 4, legend.direction = 'horizontal')
densplot_data_frame(Theoph, 'conc', 'Subject',
space = 'top', columns = 4, legend.direction = 'horizontal', gg = TRUE)
densplot_data_frame(Theoph, 'conc', , 'Subject')
# }
Run the code above in your browser using DataLab