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(97.4,98,106,101.2,102.7,110,91.8,97.4,111.9,114.8,107,104.2,99.5,98.2,108.8,100.1,105,108.3,96.7,100.5,115.5,114.9,110.7,107.7,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,124.7,133.4,132.4,125.2,135.4,117.6) > x <- c(96.1,101.7,109.9,98.1,102.4,110,71.6,74.8,110.3,109.2,104.9,100.6,85,95.9,108.9,96.1,100.1,105.8,64.4,66.9,110.4,96.1,102.5,97.6,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,69.3,77.4,79.3,78.6,76.2,64) > par5 = 'Productie niet-duurzame consumptiegoederen' > par4 = 'Productie duurzame consumptiegoederen' > par3 = 'TRUE' > par2 = 'yellow' > par1 = 'brown' > ylab = '' > main = 'Back to Back Histogram' > 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/1csfk1224545622.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/1csfk1224545622.ps tmp/1csfk1224545622.png") > > > proc.time() user system elapsed 0.938 0.170 1.018