Learn R Programming

multiDimBio (version 1.2.2)

boxWhisker: A function to create a box and whisker plot by group ID

Description

A function to create a box and whisker plot by group ID.

Usage

boxWhisker(data, groups, palette = "Paired")

Value

Returns a box-whisker plot of the data by group ID.

Arguments

data

a (non-empty) matrix of data values

groups

a (non-empty) vector of group IDs with length equal to the number of rows in data

palette

A color palette for plotting. The default is 'Paired.' See colorbrewer2.org for alternatives.

Examples

Run this code
data(Nuclei)
data(Groups)
boxWhisker(Nuclei, Groups)

#changing the color palette

boxWhisker(data = Nuclei, groups = Groups, palette = 'Set1')

Run the code above in your browser using DataLab