R version 2.6.1 (2007-11-26) Copyright (C) 2007 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. > x <- c(30,30,34,28,29,30,32,32,33,34,33,33,33,33,34,34,34,34,33,33,34,32,32,33,36,38,33,35,36,33,33,34,33,23,25,27,28,39,36,35,34,33,40,33,34,35,32,31,34,34,35,33,36,36,35,35,35,35,35,34,27,28,29,30,31,32,30,30,31,31,31,31,31,32,32,32,32,32,33,33,34,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,44,44,44,44,44,43,43,43,43,43,42,42,41,40,46,46,46,46,46,46,46,46,46,47,47,47,55,54,53,53,52,52,52,52,51,51,50,50,49,49,49,49,49,49,48,43,43,44,46,47,47,47,47,47,47,47,48,48,48,48,48,48,50,50,50,51) > par2 = 'grey' > par1 = '15' > xlab = 'x' > main = '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!) > par1 <- as.numeric(par1) > postscript(file="/var/www/html/rcomp/tmp/155tw1200743671.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (is.na(par1)) { + myhist<-hist(x,col=par2,main=main,xlab=xlab) + } else { + if (par1 < 0) par1 <- 3 + if (par1 > 50) par1 <- 50 + myhist<-hist(x,breaks=par1,col=par2,main=main,xlab=xlab) + } > dev.off() null device 1 > myhist $breaks [1] 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 $counts [1] 1 1 5 8 18 31 14 1 3 3 13 25 17 11 7 3 1 $intensities [1] 0.003086419 0.003086420 0.015432099 0.024691358 0.055555556 0.095679012 [7] 0.043209877 0.003086420 0.009259259 0.009259259 0.040123457 0.077160494 [13] 0.052469136 0.033950617 0.021604938 0.009259259 0.003086420 $density [1] 0.003086419 0.003086420 0.015432099 0.024691358 0.055555556 0.095679012 [7] 0.043209877 0.003086420 0.009259259 0.009259259 0.040123457 0.077160494 [13] 0.052469136 0.033950617 0.021604938 0.009259259 0.003086420 $mids [1] 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 $xname [1] "x" $equidist [1] TRUE attr(,"class") [1] "histogram" > n <- length(x) > load(file='/var/www/html/rcomp/createtable') > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/histogram.htm','Frequency Table (Histogram)',''),6,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Bins',header=TRUE) > a<-table.element(a,'Midpoint',header=TRUE) > a<-table.element(a,'Abs. Frequency',header=TRUE) > a<-table.element(a,'Rel. Frequency',header=TRUE) > a<-table.element(a,'Cumul. Rel. Freq.',header=TRUE) > a<-table.element(a,'Density',header=TRUE) > a<-table.row.end(a) > crf <- 0 > for (i in 1:(length(myhist$breaks)-1)) { + a<-table.row.start(a) + dum <- paste('[',myhist$breaks[i],sep='') + dum <- paste(dum,myhist$breaks[i+1],sep=',') + dum <- paste(dum,'[',sep='') + a<-table.element(a,dum,header=TRUE) + a<-table.element(a,myhist$mids[i]) + a<-table.element(a,myhist$counts[i]) + rf <- myhist$counts[i]/n + crf <- crf + rf + a<-table.element(a,round(rf,6)) + a<-table.element(a,round(crf,6)) + a<-table.element(a,round(myhist$density[i],6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/2u2jb1200743671.tab") > > system("convert tmp/155tw1200743671.ps tmp/155tw1200743671.png") > > > proc.time() user system elapsed 0.635 0.171 0.673