Learn R Programming

metaplot (version 0.3.2)

boxplot_data_frame: Boxplot Function for Data Frame

Description

Boxplot for data.frame. Uses standard evaluation.

Usage

boxplot_data_frame(x, yvar, xvar, facets = NULL, log = FALSE,
  horizontal = NULL, crit = 1.3, ref = NULL, nobs = FALSE,
  na.rm = TRUE, xlab = NULL, ylab = NULL, aspect = 1,
  main = getOption("metaplot_main", NULL), sub = getOption("metaplot_sub",
  NULL), ...)

Arguments

x

data.frame

yvar

y variable

xvar

x variable

facets

optional conditioning variables

log

whether to log transform numeric variable (auto-selected if NULL)

horizontal

whether box/whisker axis should be horizontal (numeric x, categorical y); defaults TRUE if (var[[2]] is numeric

crit

if log is NULL, log-transform if mean/median ratio for non-missing x is greater than this value

ref

optional reference line on numeric axis

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

passed to bwplot

ylab

passed to bwplot

aspect

passed to bwplot

main

character, or a function of x, yvar, xvar, facets, and log

sub

character, or a function of x, yvar, xvar, facets, and log

...

passed arguments

See Also

Other mixedvariate plots: boxplot.data.frame

Other boxplot: boxplot.data.frame

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab