Learn R Programming

metaplot (version 0.7.1)

boxplot.data.frame: Boxplot Method for Data Frame

Description

Boxplot for data.frame. Parses arguments and generates the call: fun(x, yvar, xvar, facets, ...).

Usage

# S3 method for data.frame
boxplot(x, ..., fun = getOption("metaplot_box",
  "boxplot_data_frame"), verbose = metOption("metaplot_verbose_boxplot",
  FALSE))

Arguments

x

data.frame

...

passed to fun

fun

function that does the actual plotting

verbose

generate messages describing process

See Also

Other mixedvariate plots: boxplot_data_frame, boxplot_panel

Other boxplot: boxplot_data_frame

Other methods: axislabel.data.frame, categorical.data.frame, corsplom.data.frame, densplot.data.frame, metaplot.data.frame, pack.data.frame, plot.metaplot_gtable, print.metaplot_gtable, scatter.data.frame, unpack.data.frame

Examples

Run this code
# NOT RUN {
library(dplyr)
library(magrittr)
Theoph %<>% mutate(site = ifelse(as.numeric(Subject) > 6, 'Site A','Site B'))
boxplot(Theoph,'Subject','conc')
boxplot(Theoph,Subject,conc)
boxplot(Theoph,Subject,conc, gg = T)
boxplot(Theoph,conc,Subject)
boxplot(Theoph,conc,Subject, gg = T)
boxplot(Theoph,conc,Subject,site)
boxplot(Theoph,conc,Subject,site, gg = T)
boxplot(Theoph,conc,Subject,site, gg = T, scales = 'free_x')
attr(Theoph,'title') <- 'Theophylline'
boxplot(Theoph, Subject, conc, main = function(x,...)attr(x,'title'))
boxplot(Theoph, Subject, conc, main = function(x,...)attr(x,'title'), gg = T)
boxplot(Theoph, Subject, conc, sub= function(x,...)attr(x,'title'))
boxplot(Theoph, Subject, conc, sub= function(x,...)attr(x,'title'), gg = T)
boxplot(Theoph %>% filter(conc > 0),Subject,conc, log = T)
boxplot(Theoph %>% filter(conc > 0),Subject,conc, log = T, gg = T)
# }

Run the code above in your browser using DataLab