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(113.5,106.9,119.5,109.4,106.8,118.7,109,112.9,125.1,126.6,122.6,127.4,107.1,112,122.1,111.7,113.1,128.2,115.2,117.4,132,130.8,128,132.8,116.9,110.9,123.6,117.4,122.6,123.5,111.4,113.8,131.2,126.9,126.1,121.2,118.7,117.9,135.3,120.7,126.3,129.7,113.3,120.5,135.5,137.5,130.7,133.1,121.5,120.5,137,123.6,128.5,135,120.8,121.2,132.1,134.5,133.6,135.9,124.5) > x <- c(83.6,86.5,96,91,87.2,84.5,59.1,61.6,98.8,97.9,92.8,84.2,74.6,79.8,86.7,79.8,87,91.3,58.7,62.8,87.8,90.4,80.6,73.5,71.5,70.6,78.3,76,77.4,80.9,63.5,58,88.2,81.2,84.9,76.4,71.5,76.1,82.9,78.1,82,84.7,55.7,59.5,83.2,87.6,76.2,76.4,68.2,70,76.3,70.9,72.5,80.1,57.4,62.7,82.6,88.9,80.5,72.1,69.4) > par5 = 'Niet duurzame consumptiegoederen' > par4 = 'Duurzame' > 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/freestat/rcomp/tmp/1m1y31224533045.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/1m1y31224533045.ps tmp/1m1y31224533045.png") > > > proc.time() user system elapsed 1.233 0.225 1.281