Learn R Programming

metaplot (version 0.2.7)

boxplot_data_frame: Boxplot Function for Data Frame

Description

Boxplot for data.frame. Uses standard evaluation.

Usage

boxplot_data_frame(x, var, log = FALSE, horizontal = NULL, main = FALSE,
  crit = 1.3, ref = NULL, nobs = FALSE, na.rm = TRUE, xlab = NULL,
  ylab = NULL, aspect = 1, ...)

Arguments

x

data.frame

var

character vector of variables to plot (expecting length: 2)

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

main

logical: whether to include title indicating x and y items; or a substitute title or NULL

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

...

passed arguments

See Also

Other bivariate functions: boxplot.data.frame

Examples

Run this code
# NOT RUN {
library(magrittr)
library(dplyr)
boxplot_data_frame(Theoph,c('Subject','conc'))
boxplot_data_frame(Theoph %>% filter(conc > 0),
c('conc','Subject'), log = TRUE, ref = c(2,5),horizontal = FALSE)
# }

Run the code above in your browser using DataLab