Description Usage Arguments Value Author(s) See Also Examples

This is an improvment on the original vioplot function (combination of a box plot and a kernel density plot). You can now pass a list of violins and a list of colors. Optionally it also returns statistics on the distributions as well.

1 2 3 4 5 6 7 8 9 | ```
violins(x, by, range = 1.5, h = NULL, ylim = NULL, names =
NULL, horizontal = FALSE, col = "transparent", border
= "black", lty = 1, lwd = 1, rectCol = "grey50",
colMed = "grey80", pchMed = 19, at, add = FALSE, wex =
1, drawRect = TRUE, main = "", xlab = "", ylab = "",
connect = c("median", "mean", "hubermu", "deciles"),
SD.or.SE = c("SD"), connectcol = c("lightblue",
"cyan", "darkred", "grey"), las = 2, stats = FALSE,
quantiles = c(0.1, 0.9), CImed = TRUE, deciles = TRUE)
``` |

`x` |
list of vectors or a dataframe |

`by` |
accepts 'by' object for grouping |

`range` |
a factor to calculate the upper/lower adjacent values. |

`h` |
the height for the density estimator, if omit as explained in sm.density, h will be set to an optimum. |

`ylim` |
y limits. |

`names` |
one label, or a vector of labels for the datas must match the number of datas given. |

`horizontal` |
description of var 1. |

`col,border,lty,lwd` |
Graphical parameters for the violin passed to lines and polygon. |

`rectCol,colMed,pchMed` |
Graphical parameters to control the look of the box. |

`at` |
position of each violin. Default to 1:n |

`add` |
logical. if FALSE (default) a new plot is created |

`wex` |
relative expansion of the violin. |

`drawRect` |
logical. the box is drawn if TRUE. |

`main` |
main title for the plot. |

`connect` |
connects a violin plot series at the medians with line segments |

`connectcol` |
line color of the median connecting line segments |

`xlab` |
x axis label |

`ylab` |
y axis label |

`stats` |
print out statistics |

`SD.or.SE` |
Boolean for standard deviation or standard error |

`las` |
axis tick mark labels orientation |

`quantiles` |
map any pair of quantiles (as dotted box) in addition to Q1 & Q3, but are not shown when "c(0,0)" and arg is passed to descriptive stats when 'stats'=TRUE |

`CImed` |
portrays 95 percent confidence intervals for the median (as solid box) |

`deciles` |
maps deciles 0.1:0.9 (as thin lines) independently of 'quantiles' and can be connected when 2 or more variables are plotted. |

a series of violin plots

Daniel Adler <[email protected]>, David Schruth, Dave McArthur <[email protected]>

vioplot(vioplot), sm.density

1 2 3 4 5 6 7 8 9 10 |

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.