twoway_strip: Two Way Strip Plot of Groups

Description Usage Arguments Details Examples

View source: R/twoway_strip.R

Description

Two way strip plot of a variable of interest and a grouped variable with data points' color denoting the specific groups (i.e. day of week or species). The mean will be displayed, with lineplot running through the means of each different group.

Usage

1
2
twoway_strip(data, xname, yname,
             bysize, bycolor, xlabel, ylabel)

Arguments

data

Dataset to use for plot, must be in data.frame to plot.

xname

Consists of specification of x variable.

yname

Consists of specification of y variable.

bysize

Consists of specificiation of sorting variable by size.

bycolor

Consists of specificiation of sorting variable by color.

xlabel

Name for x axis labels.

ylabel

Name for y axis labels.

Details

twoway_strip is similar to twoway_scatter, both utilizing the exact same arguments. The strip plot is specifically useful for looking at grouped variables (i.e. time, species).

Examples

1
2
3
4
5
6
7
example <- iris
day <- c("Mon", "Tues", "Wed")
example$time <- rep_len(day, length.out=length(example))
twoway_strip(example, example$time, example$Petal.Length,
       " ", example$time, "Day of Week", "Petal Length")
twoway_strip(example, example$Species, example$Petal.Length,
        " ", example$Species, "Species", "Petal Length")

bhsu4/weightprog documentation built on May 28, 2019, 7:10 p.m.