R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(185,188,175,190,198,185,196,183,185,188,196,188,183,208,183,178,178,180,183,203,203,178,190,190,190,196,183,188,185,188,193,193,183,188,185,180,198,190,185,190,183,185,190,185,188,198,196,180,185,190) > x <- c(175,183,172,188,173,182,164,177,173,177,168,170,170,163,178,184,162,175,174,165,174,176,161,180,176,177,173,173,177,181,172,178,181,185,166,175,180,178,166,177,180,177,180,180,174,174,185,168,175,170) > par5 = 'Mannen' > par4 = 'Vrouwen' > par3 = 'TRUE' > par2 = 'red' > par1 = 'blue' > ylab = 'y' > xlab = 'x' > main = 'Back to Back Histogram' > par5 <- 'Mannen' > par4 <- 'Vrouwen' > par3 <- 'TRUE' > par2 <- 'red' > par1 <- 'blue' > #'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 is masked from 'package:survival': untangle.specials The following objects 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/fisher/rcomp/tmp/1qoq51386608157.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/1qoq51386608157.ps tmp/1qoq51386608157.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.973 0.323 2.261