Learn R Programming

epade (version 0.2.2)

box.plot.ade: Boxplot

Description

Draw a box, a violin, a box-percentile and more plots for subgroups

Usage

box.plot.ade(x, group=NULL, group2=NULL, data=NULL, vnames=NULL,
             main=NULL, xlab=NULL, ylab=NULL, ylim=NULL, yticks=NULL,
             col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL, pdigs=4, alpha=NULL,
             cex=1, cex.axis=1, lwd=2, h=NULL, lty=2, test=FALSE,
             varwidth=TRUE, means=FALSE, count=TRUE, zylinder=FALSE,
             twoside=TRUE, outlier=TRUE, wall=0, type='box')

Arguments

x
  • a numeric vector of values
a character string with the name of the variable in the data.frame a formula x~group or x~group+group2

item

  • group
  • a character string with the name of the group variable in the data.frame
  • group2
  • a character string with the name of the group2 variable in the data.frame
  • data
  • vnames
  • main
  • xlab
  • ylab
  • ylim
  • yticks
  • col
  • tcol
  • bgcol
  • lcol
  • pdigs
  • alpha
  • cex
  • cex.axis
  • lwd
  • h
  • lty
  • test
  • varwidth
  • means
  • count
  • a string to replace N with it, if you use "?" in you string in will be replaced with N.
  • a vector of strings to replace N with it, if you use "?" in you strings in will be replaced with N.
  • zylinder
  • twoside
  • outlier
  • wall
  • type
  • "violin" for a violinplot
  • "sd" for mean and one sd interval
  • "2sd" for mean and one, two sd intervals
  • "percentile" for a box-percentile plot
  • "iqr" for a IQR plot

itemize

  • "boxplot" for a normal boxplot

Details

it test for difference with T-test or U-test depends on the skewness <= 1="" or="">1. For a trend it perform a Jonckheere-Terpstra trend test.

Examples

Run this code
x<-rnorm(1000)
g<-round(runif(1000))
g2<-round(runif(1000))
box.plot.ade(x, g, g2, vnames=list(c("subgroup 1","subgroup 2"),
c("group 1", "group 2")), wall=0, count='N: ?', means=TRUE)
box.plot.ade(x, g, g2, vnames=list(c("subgroup 1","subgroup 2"),
c("group 1", "group 2")), wall=1, type="violin")
box.plot.ade(x, g, g2, vnames=list(c("subgroup 1","subgroup 2"),
c("group 1", "group 2")), wall=2, type="percentile")
box.plot.ade(x, g, g2, vnames=list(c("subgroup 1","subgroup 2"),
c("group 1", "group 2")), wall=3, type="sd")

Run the code above in your browser using DataLab