beeStripBox: plot quantitative x categorical data

Description Usage Arguments Value Examples

View source: R/plotting_functions.R

Description

plots a histogram of your individual data points alongside a boxplot for each group

Usage

1
2
3
4
5
6
7
8
beeStripBox(data, group, lab = rep(c(), length(data)), point_size = 1.4,
  beeMethod = "center", line_width = 3, point_col = ifelse(is.list(data)
  %>% rep(20), viridis(length(data) + 1)[1:length(data)],
  viridis(nlevels(group) + 1)[1:nlevels(group)]),
  y_limits = c(ifelse(is.list(data), min(unlist(data)), min(data)),
  ifelse(is.list(data), max(unlist(data), max(unlist(data))))), mean = FALSE,
  sample_size = T, side = -1, stats = T, box_thickness = 0.2,
  box_color = FALSE, ...)

Arguments

data

list of groups you want to plot, or, if group is not left blank, a data frame

group

if you gave a dataframe for data, group is the name of the column containing group identities

lab

labels for groups

point_size

size of plotting characters. defaults to 1.4

beeMethod

see beeswarm. defaults to "center"

line_width

width of the line

point_col

color of the each group. defaults to viridis colors

y_limits

limits of the y axis

mean

does nothing right now

sample_size

logical. plot sample size under each group?

side

defaults to -1. determines whether the histogram are stacked to the right or the left

stats

logical. do an ANOVA and print the p-value to the plot?

box_thickness

thickness of the lines that form the boxplot. defaults to 0.2

box_color

defaults to FALSE. color of the lines that form the boxes

...

other arguments to pass to par()

Value

ANOVA results

Examples

1
data(iris); beeStripBox(iris$Sepal.Length,iris$Species,xlab="species",ylab="sepal length",main="beeStripBox() example")

lukereding/redingPlot documentation built on May 21, 2017, 3:44 p.m.