strip: plot categorical x quantitative data jittered

Description Usage Arguments Value Examples

Description

plots each vector in your list as a group with the data jittered, draws a point at the mean. very similar to simple()

Usage

1
2
3
4
strip(data, lab = rep(c(), length(data)), type = "se", jitter = T,
  points = 16, xlab = "", ymin = "determine", ymax = "determine",
  point_size = 1.2, mean_col = "red", cols = viridis(length(data) +
  2)[1:length(data)], ...)

Arguments

data

list of vectors you want to plot

lab

labels for each group

type

what kind of uncertainty do you want to show around the mean? options are "se" for standard error, "sd" for standard deviation, or "ci" for a 95 percent confidence interval

jitter

logical. should the data be jittered?

points

type of plotting character. defaults to solid point, i.e., 16

xlab

label for x axis

ymin

minimum y value.

ymax

maximum y value

point_size

size of the plotting characters. defaults to 1.2

mean_col

color of the point for the mean. defaults to "red"

cols

vector of colors for the groups. defaults to viridis colors

...

other arguments to pass to be par()

Value

None

Examples

1
2
3
4
strip(list(rnorm(50,5),rnorm(20,10)))
strip(list(rpois(50,5),rpois(20,3),rnorm(100,7)),type="ci",lab=c("a","b","c"),xlab="group",ylab="response")
strip(list(rpois(50,5),rpois(20,3),rnorm(100,7),rnorm(45,2),rnorm(90,9)),type="ci",lab=c("a","b","c","d","e"),xlab="group",ylab="value",mean_col="black",col=viridis(7)[1:5] %>% addAlpha(0.5))
strip(list(iris %>% filter(Species=="setosa") %>% .$Sepal.Length, iris %>% filter(Species=="versicolor") %>% .$Sepal.Length, iris %>% filter(Species=="virginica") %>% .$Sepal.Length),lab=c("setosa","versicolor","virginica"),ylab="sepal length",main="strip()",xlab="species",mean_col="black",point_size=1.4,type="ci")

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