tests/mosaic.R

library(SVGAnnotation)
if(require(vcd)) {
  data(Titanic)
  mos = svgPlot(m <- mosaic(~ Sex + Age + Survived, data = Titanic,
                 main = "Survival on the Titanic", shade = TRUE, legend = TRUE))
  annotateMosaic(mos, m)
  saveXML(mos, "titanicMosaic.svg")
}
duncantl/SVGAnnotation documentation built on May 15, 2019, 5:57 p.m.