Learn R Programming

violinmplot (version 0.2.1)

violinmplot-package: Combined violin, mean and standard deviation plots.

Description

Combine violin plots with information about arithmetic mean and standard deviation.

Arguments

Details

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.

References

The package was developed for a 2009 German national survey of usability in healthcare IT. http://www.usabil-it.de/2009/ (in German)

See Also

lattice

Examples

Run this code
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)

Run the code above in your browser using DataLab