stripPlot: Plot a customized stipchart

View source: R/stripPlot.R

stripPlotR Documentation

Plot a customized stipchart

Description

Plot a customized stipchart

Usage

stripPlot(
  data,
  formula,
  col = NULL,
  addBoxplot = FALSE,
  jitter = 0.3,
  grid = FALSE,
  ...
)

Arguments

formula

a formula, such as y ~ grp, where y is a numeric vector of data values to be split into groups according to the grouping variable grp (usually a factor)

col

if col is non-null it is assumed to contain colors to be used

addBoxplot

if TRUE, a bxplot (package beeswarm) is drawn for each factor modalities

grid

if TRUE, draw a grid

datafr

data.frame

Value

customized stripchart graphics

Author(s)

JuG

Examples

dtf <- data.frame(val1 = rnorm(1000,1,.2), fact2 = LETTERS[gl(n = 5,k = 200,length = 1000)])
if(!require(colorRamps)){install.packages('colorRamps')}
require(colorRamps)
stripPlot(data = dtf, val1 ~ fact2, addBoxplot = TRUE,col=matlab.like(12))

if(!require(RColorBrewer)){install.packages('RColorBrewer')}
library("RColorBrewer")
stripPlot(data = dtf, val1 ~ fact2,col=brewer.pal(n = 5, name = "Dark2"), jitter = .2,grid = T)


jgodet/utilitR documentation built on May 16, 2024, 12:01 p.m.