boxplot_data_frame {metaplot} | R Documentation |
Boxplot Function for Data Frame
Description
Boxplot for data.frame. Creates a boxplot using boxplot_panel
by default.
Usage
boxplot_data_frame(
x,
yvar,
xvar,
facets = NULL,
log = metOption("log_boxplot", FALSE),
crit = metOption("crit_boxplot", 1.3),
horizontal = metOption("horizontal_boxplot", NULL),
scales = metOption("scales_boxplot", NULL),
panel = metOption("panel_boxplot", "boxplot_panel"),
ref = metOption("ref_boxplot", "metaplot_ref"),
ref.col = metOption("ref.col_boxplot", "grey"),
ref.lty = metOption("ref.lty_boxplot", "solid"),
ref.lwd = metOption("ref.lwd_boxplot", 1),
ref.alpha = metOption("ref.alpha_boxplot", 1),
nobs = metOption("nobs_boxplot", FALSE),
na.rm = metOption("na.rm_boxplot", TRUE),
xlab = NULL,
ylab = NULL,
numlab = metOption("numlab_boxplot", "axislabel"),
catlab = metOption("catlab_boxplot", "axislabel"),
aspect = metOption("aspect_boxplot", 1),
as.table = metOption("as.table_boxplot", TRUE),
main = metOption("main_boxplot", NULL),
sub = metOption("sub_boxplot", NULL),
settings = metOption("settings_boxplot", NULL),
padding = metOption("padding_boxplot", 1),
reverse = metOption("reverse_boxplot", TRUE),
pch = metOption("pch_boxplot", "|"),
notch = metOption("notch_boxplot", FALSE),
gg = metOption("gg_boxplot", FALSE),
verbose = metOption("verbose_boxplot", FALSE),
...
)
Arguments
x |
data.frame |
yvar |
y variable |
xvar |
x variable |
facets |
optional conditioning variables |
log |
whether to log transform numeric variable (auto-selected if NA) |
crit |
if log is NA, log-transform if mean/median ratio for non-missing values is greater than this value |
horizontal |
whether box/whisker axis should be horizontal (numeric x, categorical y); defaults TRUE if var[[2]] is numeric |
scales |
passed to |
panel |
panel function |
ref |
optional reference line(s) on numeric axis; can be function(x = x, var = con, ...) or NULL to suppress |
ref.col |
color for reference line(s); can be length one integer to auto-select that many colors |
ref.lty |
line type for reference line(s) |
ref.lwd |
line size for reference line(s) |
ref.alpha |
transparency for reference line(s) |
nobs |
whether to include the number of observations under the category label |
na.rm |
whether to remove data points with one or more missing coordinates |
xlab |
x axis label |
ylab |
y axis label |
numlab |
numeric axis label; can be function(x = x, var = numvar, log = ylog, ...) |
catlab |
categorical axis label; can be function(x = x, var = catvar, ...) |
aspect |
passed to |
as.table |
passed to |
main |
character, or a function of x, yvar, xvar, facets, and log |
sub |
character, or a function of x, yvar, xvar, 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) |
reverse |
if y is categorical, present levels in reverse order (first at top) |
pch |
special character for box median: passed to |
notch |
whether to draw notched boxes: passed to |
gg |
logical: whether to generate |
verbose |
generate messages describing process |
... |
passed arguments |
See Also
Other mixedvariate plots:
boxplot.data.frame()
,
boxplot_panel()
Other boxplot:
boxplot.data.frame()
Other metaplot:
categorical_data_frame()
,
corsplom_data_frame()
,
densplot_data_frame()
,
metaplot_key()
,
metaplot()
,
scatter_data_frame()
,
test_metaplot()
Examples
library(magrittr)
library(dplyr)
boxplot_data_frame(Theoph,'Subject','conc')
boxplot_data_frame(Theoph %>% filter(conc > 0),
'conc','Subject', log = TRUE, ref = c(2,5),horizontal = FALSE)