Learn R Programming

ChemoSpec (version 4.4.97)

labelExtremes: Label Extreme Values in a 2D Data Set

Description

A utility function which plots the sample names next to the sample points. The number of samples labeled can be specified by passing it from the calling function. An internal function, not generally called by the user.

Usage

labelExtremes(data, names, tol)

Arguments

data

A matrix containing the x values of the points/samples in the first column, and the y values in the second.

names

A character vector of sample names. Length must match the number of rows in x.

tol

A number describing the fraction of points to be labeled. tol = 1.0 labels all the points; tol = 0.05 labels approximately the most extreme 5 percent. Note that this is simply based upon quantiles, assumes that both x and y are each normally distributed, and treats x and y separately. Thus, this is not a formal treatment of outliers, just a means of labeling points. Note too that while this function could deal with groups separately, the way it is called by plotScoresDecoration lumps all groups together.

Value

None. Annotates the plot with labels.

References

https://github.com/bryanhanson/ChemoSpec