R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(247.182,251.362,257.784,264.661,258.558,235.162,235.042,238.575,242.254,249.192,250.333,242.470,244.894,248.197,254.511,261.678,253.299,231.770,233.271,237.520,242.082,243.287,246.526,245.622,247.447,252.470,262.976,267.145,260.951,239.171,238.454,245.385,252.487,257.375,261.240,252.222,250.627,255.159,263.948,268.145,263.281,242.967,241.326,248.985,247.599,247.323,246.546,243.985,241.478,242.936,251.178,254.016,249.999,229.521,228.793,239.709,239.494,251.846,253.376,248.284) > x <- c(207.221,210.506,216.222,224.325,214.419,189.422,188.222,191.395,195.978,201.920,203.583,191.987,186.424,191.568,200.140,211.451,211.524,182.510,182.414,187.827,192.684,198.480,203.089,199.834,195.770,203.555,211.868,229.527,229.139,198.563,195.722,202.196,205.816,212.588,214.320,220.376,204.442,206.903,214.126,226.899,223.532,195.309,186.005,188.906,191.563,189.226,186.412,178.037,166.827,169.362,174.330,187.069,186.530,158.114,151.001,159.612,161.914,164.182,169.701,171.297) > par5 = 'Wallonie' > par4 = 'Vlaanderen' > par3 = 'TRUE' > par2 = 'white' > par1 = 'grey' > ylab = ' ' > main = 'Back to Back Histogram' > par5 <- 'Wallonie' > par4 <- 'Vlaanderen' > par3 <- 'TRUE' > par2 <- 'white' > par1 <- 'grey' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Back to Back Histogram (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_backtobackhist.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > if (par3 == 'TRUE') par3 <- TRUE > if (par3 == 'FALSE') par3 <- FALSE > library(Hmisc) Loading required package: survival Loading required package: splines Hmisc library by Frank E Harrell Jr Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation. NOTE:Hmisc no longer redefines [.factor to drop unused levels when subsetting. To get the old behavior of Hmisc type dropUnusedLevels(). Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > z <- data.frame(cbind(x,y)) > names(z) <- list(par4,par5) > postscript(file="/var/wessaorg/rcomp/tmp/1jb901355248522.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > out <- histbackback(z, probability=par3, main = main, ylab = ylab) > barplot(-out$left, col=par1, horiz=TRUE, space=0, add=TRUE, axes=FALSE) > barplot(out$right, col=par2, horiz=TRUE, space=0, add=TRUE, axes=FALSE) > dev.off() null device 1 > > try(system("convert tmp/1jb901355248522.ps tmp/1jb901355248522.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.124 0.196 1.297