Description Usage Arguments Value Author(s) See Also Examples
Produce box-and-whisker plot(s) ordered by function such as
mean or median. Wrapper around boxplot
.
1 2 3 4 5 6 7 8 9 |
formula |
a formula, such as 'y ~ Condition', where 'y' is a numeric vector of data values to be split into groups according to the grouping variable 'Condition' (usually a factor). |
data |
a data.frame from which the variables in 'formula' should be taken. |
decreasing |
Logical: Indicating whether the sort should be increasing or decreasing. |
FUN |
a function to compute the summary statistics which can be applied to all data subsets. |
idx |
Numeric vector providing the ordering of groups instead of
specifying a function in |
col |
Fill color of the boxplots. Alias for |
... |
Other parameters to adjust the layout of the boxplots.
See |
The ordered stats.
Jacolien van Rij
Other Functions for plotting:
addInterval()
,
add_bars()
,
add_n_points()
,
alphaPalette()
,
alpha()
,
check_normaldist()
,
color_contour()
,
dotplot_error()
,
drawDevArrows()
,
emptyPlot()
,
errorBars()
,
fill_area()
,
getCoords()
,
getFigCoords()
,
getProps()
,
gradientLegend()
,
legend_margin()
,
marginDensityPlot()
,
plot_error()
,
plot_image()
,
plotsurface()
1 2 3 4 5 6 7 | head(ToothGrowth)
# sort on basis of mean length:
sortBoxplot(len ~ dose:supp, data = ToothGrowth)
# sort on basis of median length:
sortBoxplot(len ~ dose:supp, data = ToothGrowth, decreasing=FALSE)
# on the basis of variation (sd):
sortBoxplot(len ~ dose:supp, data = ToothGrowth, FUN='sd', col=alpha(2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.