R version 2.7.2 (2008-08-25) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(1.00,1.04,1.02,1.07,1.12,1.08,1.02,1.01,1.04,0.98,0.95,0.94,0.94,0.96,0.97,1.03,1.01,0.99,1.00,1.00,1.02,1.01,0.99,0.98,1.01,1.03,1.03,1.00,0.96,0.97,0.98,1.02,1.04,1.01,1.01,1.00,1.01,1.02,1.03,1.06,1.12,1.12,1.13,1.13,1.13,1.17,1.14,1.08,1.07,1.12,1.14,1.21,1.20,1.23,1.29,1.31,1.37,1.35,1.26,1.26) > x <- c(0.33,0.33,0.32,0.33,0.34,0.36,0.34,0.33,0.35,0.31,0.28,0.26,0.26,0.26,0.29,0.30,0.30,0.28,0.29,0.29,0.32,0.33,0.29,0.31,0.33,0.36,0.39,0.30,0.27,0.28,0.29,0.30,0.30,0.30,0.31,0.30,0.31,0.29,0.32,0.33,0.35,0.35,0.36,0.40,0.40,0.47,0.43,0.38,0.38,0.40,0.45,0.47,0.45,0.50,0.54,0.55,0.59,0.51,0.50,0.50) > par5 = 'Prijs per liter eurosuper 95' > par4 = 'Prijs per liter gasolie' > par3 = 'TRUE' > par2 = 'grey' > par1 = 'grey' > ylab = '' > main = 'Back to Back Histogram' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Back to Back Histogram (v1.0.2) 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 > #Technical description: Write here your technical program description > if (par3 == 'TRUE') par3 <- TRUE > if (par3 == 'FALSE') par3 <- FALSE > library(Hmisc) Attaching package: 'Hmisc' 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/www/html/rcomp/tmp/1b8pr1224524495.ps",horizontal=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 > > system("convert tmp/1b8pr1224524495.ps tmp/1b8pr1224524495.png") > > > proc.time() user system elapsed 0.963 0.169 1.089