pointbox: Boxplots with points

Description Usage Arguments Details Value See Also Examples

View source: R/pointbox.R

Description

pointbox Plot boxplots with points (scatterplot).

Usage

1
2
3
pointbox(value, grp, b_col = NULL, s_col = NULL, s_pch = 16,
  s_jitter = NULL, showN = TRUE, heightN = NULL, stat_test = TRUE,
  y_range = NULL, s_outline = TRUE, ...)

Arguments

value

Numeric variable for N measurements.

grp

Classification of measurements.

b_col

Boxplot color. Default: NULL (black)

s_col

Scatterplot color. Default: NULL (black). If specified, length of N, as each point can be colored separately.

s_pch

Point type. Default: 16, filled circle.

s_jitter

Jitter factor for points.

showN

Logical. Show number of samples in each classification.

heightN

Manually set height for N if showN = TRUE.

stat_test

Logical. Perform statistical test? Currently, only one-sided anova is implemented.

y_range

Manually specify y-axis range.

s_outline

Logical. Outline points.

...

Arguments passed on to par. See par.

Details

Colors for boxes and points are defined separately to allow for fine-tuned user control.

Value

Boxplot with horizontally jittered points.

See Also

par

Examples

1
2
3
4
5
# Make data
d <- c(rnorm(n = 10, mean = 1, sd = 0.5),
       rnorm(n = 10, mean = 5, sd = 0.5))
g <- c(rep('a', 10), rep('b', 10))
pointbox(value = d, grp = g)

sean-cho/toolkit documentation built on May 29, 2019, 4:24 p.m.