Description Details Author(s) References See Also Examples
Combine violin plots with information about arithmetic mean and standard deviation.
Package: | violinmplot |
Type: | Package |
Version: | 0.2 |
Date: | 2010-09-17 |
License: | GPL-2 |
LazyLoad: | yes |
The package can be used to generate violin plots with overlayed arithmetic mean and standard deviation using the function violinmplot. See examples below.
Raphael W. Majeed
Maintainer: Raphael W. Majeed <raphael.majeed@chiru.med.uni-giessen.de>
The package was developed for a 2009 German national survey of usability in healthcare IT. http://www.usabil-it.de/2009/ (in German)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(lattice)
library(violinmplot)
## Sample data frame
x <- c(1,1,1,2,2,3, 1,2,2,3,3,3)
g <- c(1,1,1,1,1,1, 2,2,2,2,2,2)
f <- data.frame("Daten"=x,"Gruppe"=g)
## Display a horizontal violinmplot
violinmplot( Gruppe ~ Daten, data=f )
## Same plot displayed vertically
violinmplot( Daten ~ Gruppe, data=f, horizontal=FALSE)
## Display the plot again using functions from the package lattice
bwplot( Daten ~ Gruppe, data=f, horizontal=FALSE, panel=panel.violinm)
## Mean and standard deviation can be displayed without violins
bwplot( Daten ~ Gruppe, data=f, horizontal=FALSE, panel=panel.meansdplot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.