Description Usage Arguments Value Examples

Produce quantile-based box-and-whisker plot(s) of the given (grouped) values.

1 2 3 4 5 |

`x` |
a formula, such as |

`range` |
this determines how far the plot whiskers extend out from the box. If |

`probs` |
numeric vector of values in [0,1] specifying the percentiles of the upper hinge, the midpoint (usually the median) and the lower hinge. |

`qtype` |
an integer between 1 and 9 indicating which one of the nine quantile algorithms to use (see |

`data` |
a data.frame (or list) from which the variables in |

`width` |
a vector giving the relative widths of the boxes making up the plot. |

`varwidth` |
if |

`outline` |
if |

`names` |
group labels which will be printed under each boxplot. |

`plot` |
if |

`border` |
an optional vector of colours for the outlines of the boxplots. The values in |

`col` |
if |

`log` |
character indicating if x or y or both coordinates should be plotted in log scale. |

`pars` |
a list of (potentially many) more graphical parameters. |

`horizontal` |
logical indicating if the boxplots should be horizontal; default |

`add` |
logical, if |

`at` |
numeric vector giving the locations where the boxplots should be drawn; defaults to |

`...` |
other arguments (see |

List with the following components:

`stats` |
a matrix, each column contains the extreme of the lower whisker, the lower hinge, the midpoint, the upper hinge and the extreme of the upper whisker for one group/plot. |

`n` |
a vector with the number of observations in each group. |

`out` |
the values of any data points which lie beyond the extremes of the whiskers. |

`group` |
a vector of the same length as |

`names` |
a vector of names for the groups. |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
#Example 1
data = data.frame(a=runif(10), b=runif(10), c=runif(10))
qboxplot(data, range=1.3, probs=c(0.2,0.5,0.7), qtype=6)
#Example 2
qboxplot(count~spray, data=InsectSprays, col="lightgray")
#Example 3
rb = qboxplot(decrease~treatment, data=OrchardSprays, log="y", col="bisque")
title("")
rb
#Example 4
mat = cbind(Uni05=(1:100)/21, Norm=rnorm(100), "5T"=rt(100,df=5),
Gam2=rgamma(100,shape=2))
qboxplot(as.data.frame(mat))
#Example 5
data = c(102,133,136,139,142,144,146,151,160,174)
qboxplot(data.frame(data), range=1.5, probs=c(0.25,0.5,0.75), qtype=1,
ylim=c(100,220), horizontal=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.