Learn R Programming

plotfunctions (version 1.4)

orderBoxplot: Order boxplot stats following a given ordering.

Description

Order boxplot stats following a given ordering.

Usage

orderBoxplot(stats, idx)

Arguments

stats

List with information produced by a box-and-whisker plot.

idx

Order of group levels.

Value

The ordered stats.

See Also

Other Utility functions: findAbsMin(), find_n_neighbors(), firstLetterCap(), getArrowPos(), getDec(), getRange(), getRatioCoords(), get_palette(), group_sort(), inch2coords(), isColor(), list2str(), move_n_point(), se(), sortGroups()

Examples

Run this code
# NOT RUN {
head(ToothGrowth)
# sort on basis of mean length:
bp <- boxplot(len ~ dose:supp, data = ToothGrowth, plot=FALSE)
idx <- sortGroups(len ~ dose:supp, data = ToothGrowth)
bp2 <- orderBoxplot(bp, idx)
# compare:
bp$names
bp2$names
# }

Run the code above in your browser using DataLab