beeStripMod: plot qualitative x quantitative as Tufte's boxplot +...

Description Usage Arguments Value Examples

Description

plots a modified boxplot from Tufte for each group alongside the data as arranged as a histogram

Usage

1
2
3
4
5
6
7
beeStripMod(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(data)))), sample_size = T,
  side = -1, red_median = T, stats = T, ...)

Arguments

data

either a column in a dataframe containing the raw data you wish to plot, or a list, where len(your_list) == number of groups you're plotting

group

if ‘data' is a column in a dataframe, 'group' is a column in the same dataframe giving the group that each observation in 'data' belongs to. If 'data' is a list, don’t worry about this argument.

lab

labels for the groups

line_width

width of the lines for the modified boxplots

point_col

color of the data points for each group. defaults to viridis colors

y_limits

limits of the y axis

sample_size

logical. If TRUE, print the sample size under each group

red_median

logical. Should the median be red? If FALSE, defaults to the color of the group.

stats

logical. print overall p value from anova?

...

other arguments to par()

Value

None

Examples

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

lukereding/redingPlot documentation built on May 21, 2019, 8:58 a.m.