R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(NA,NA,NA,102,NA,NA,112,NA,NA,NA,118,122,NA,NA,NA,106,NA,149,122,NA,86,NA,NA,117,NA,NA,NA,NA,97,NA,132,NA,NA,87,101,115,NA,109,159,NA,NA,NA,NA,131,120,NA,86,105,NA,100,NA,NA,NA,NA,132,NA,NA,NA,105,121,NA,NA,NA,120,NA,126,138,118,NA,NA,NA,130,103,NA,NA,NA,NA,129,150,88,125,NA,NA,NA,112,144,NA,NA,NA,NA,NA,127,NA,NA,NA,NA,117,NA,108,139,NA,97,NA,NA,115,NA,95,NA,NA,NA,NA,NA,NA,NA,NA,91,NA,NA,102,NA,NA,NA,NA,NA,NA,124,NA,NA,106,125,NA,130,79,108,136,NA,NA,108,139,NA,NA,NA,NA,110,NA,NA,114,118,120,108,NA,NA,NA,130,130,112,NA,NA,NA,NA,94,NA) > x <- c(127,108,110,NA,104,140,NA,115,121,112,NA,NA,105,111,151,NA,100,NA,NA,115,NA,124,69,NA,113,123,123,84,NA,121,NA,119,98,NA,NA,NA,109,NA,NA,129,119,119,122,NA,NA,82,NA,NA,114,NA,100,99,132,82,NA,107,114,110,NA,NA,109,106,124,NA,91,NA,NA,NA,128,98,133,NA,NA,124,142,96,93,NA,NA,NA,NA,92,NA,117,NA,NA,130,87,92,114,81,NA,115,123,115,117,NA,103,NA,NA,113,NA,117,133,NA,103,NA,117,113,127,126,119,97,105,140,NA,112,113,NA,92,98,122,100,84,142,NA,137,105,NA,NA,104,NA,NA,NA,NA,98,120,NA,NA,123,90,119,105,NA,135,101,NA,NA,NA,NA,114,122,132,NA,NA,NA,114,103,115,108,NA,105) > par5 = 'Female' > par4 = 'Male' > par3 = 'TRUE' > par2 = 'red' > par1 = 'blue' > ylab = 'Total Motivation' > 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: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > if (par3 == 'TRUE') par3 <- TRUE > if (par3 == 'FALSE') par3 <- FALSE > library(Hmisc) Loading required package: survival Loading required package: splines 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/1jnp21318979147.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/1jnp21318979147.ps tmp/1jnp21318979147.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.838 0.077 0.910