Learn R Programming

epade (version 0.2.2)

tornado.ade: Tornado or population plot

Description

draw a tornado plot, it could be a population pyramid

Usage

tornado.ade(x, group=NULL, group2=NULL, data=NULL, vnames=NULL, gnames=NULL,
            gnames2=NULL, breaks=6, density=NULL, angle=NULL,
            xlab=NULL, glab=NULL, main='', legendon='topright', xticks=NULL,
            col=NULL, tcol=NULL,  bgcol=NULL, lcol=NULL, alpha=NULL,
            r=0.05, lwd=1, lty=2, wall=0, v=NULL, h=NULL)

Arguments

x
  • a numeric vector
a sigle factor a string with the name of the variable in the data.frame a formula x~group+group2 a table or matrix a list of tables

item

  • group
  • a string with the name of the factor in the data.frame
  • nothing if x is a formula, table or list
  • group2
  • a string with the name of the factor in the data.frame
  • nothing if x is a formula, table or list
  • data
  • vnames
  • gnames
  • gnames2
  • breaks
  • density
  • angle
  • xlab
  • glab
  • main
  • legendon
  • "bottom"
  • "bottomleft"
  • "left"
  • "topleft"
  • "top"
  • "topright"
  • "right"
  • "center"
  • xticks
  • col
  • tcol
  • bgcol
  • lcol
  • alpha
  • r
  • lwd
  • lty
  • wall
  • v
  • h

itemize

  • "bottomright"

Examples

Run this code
tab1<-cbind(rpois(20, 20),rpois(20, 20))
tab2<-cbind(rpois(20, 15),rpois(20, 15))
tab3<-cbind(rpois(20, 10),rpois(20, 10))
tornado.ade(list(tab1, tab2, tab3), gnames=c('Men','Women'), xlab='number')

Run the code above in your browser using DataLab