densplot_data_frame {metaplot} | R Documentation |
Density Function for Data Frame
Description
Plot density for object of class 'data.frame' using dens_panel
by default.
Usage
densplot_data_frame(
x,
xvar,
groups = NULL,
facets = NULL,
xlab = metOption("xlab_dens", "axislabel"),
ref = metOption("ref_x_dens", "metaplot_ref"),
ref.col = metOption("ref_col_dens", "grey"),
ref.lty = metOption("ref_lty_dens", "solid"),
ref.lwd = metOption("ref_lwd_dens", 1),
ref.alpha = metOption("ref_alpha_dens", 1),
log = metOption("log_dens", FALSE),
crit = metOption("crit_dens", 1.3),
aspect = metOption("aspect_dens", 1),
scales = metOption("scales_dens", NULL),
panel = metOption("panel_dens", "dens_panel"),
points = metOption("points_dens", TRUE),
colors = metOption("colors_dens", NULL),
symbols = metOption("symbols_dens", NULL),
sizes = metOption("sizes_dens", 1),
lines = metOption("lines_dens", TRUE),
types = metOption("types_dens", "solid"),
widths = metOption("widths_dens", 1),
fill = metOption("fill_dens", FALSE),
space = metOption("space_dens", "right"),
key = metOption("key_dens", "metaplot_key"),
as.table = metOption("as.table_dens", TRUE),
main = metOption("main_dens", NULL),
sub = metOption("sub_dens", NULL),
settings = metOption("settings_dens", NULL),
padding = metOption("padding_dens", 1),
gg = metOption("gg_dens", FALSE),
verbose = metOption("verbose_dens", FALSE),
...
)
Arguments
x |
data.frame |
xvar |
variable to plot |
groups |
optional grouping variable |
facets |
optional conditioning variables |
xlab |
x axis label; can be function(x = x, var = xvar, log = log, ...) |
ref |
reference line; can be function(x = x, var = xvar, ...) or NULL to suppress |
ref.col |
color for reference line(s); can be length one integer to auto-select that many colors |
ref.lty |
type for reference line(s) |
ref.lwd |
size for reference line(s) |
ref.alpha |
transparency for reference line(s) |
log |
whether to log-transform x axis (auto-selected if NA) |
crit |
if log is NA, log-transform if mean/median ratio for non-missing x is greater than this value (and no negative values) |
aspect |
passed to |
scales |
passed to |
panel |
passed to |
points |
whether to plot points: logical or alpha, same length as groups |
colors |
replacements for default colors in group order; can be length one integer to auto-select that many colors |
symbols |
replacements for default symbols in group order |
sizes |
replacements for default symbol sizes in group order |
lines |
whether to plot lines: logical or alpha, same length as groups |
types |
replacements for default line types in group order |
widths |
replacements for default line widths in group order |
fill |
whether to fill curves: logical or alpha, same length as groups (symbol fill color is same as point color) |
space |
location of key (right, left, top, bottom) |
key |
list: passed to |
as.table |
passed to |
main |
character, or a function of x, xvar, groups, facets, and log |
sub |
character, or a function of x, xvar, groups, facets, and log |
settings |
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(). |
padding |
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) |
gg |
logical: whether to generate |
verbose |
generate messages describing process |
... |
passed to |
See Also
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()
Examples
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')