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(75.6,48.7,111.7,119.5,103.4,96.3,96.6,110.4,104.4,110.7,93.6,114.8,74.9,69.8,104.2,109.3,92.7,91.7,84.4,94.5,103.6,105.9,108,119.9,84.5,76.7,120.5,119.6,102.3,101.7,86.9,93.6,113.6,106.7,96.1,124.6,72.5,89,115.3,119.1,104.4,104.9,76.9,95.3,114.9,98.9,102.9,90,81,66.2,86.7,86.7,103.4,89.5,113.7,120.2,137.8,99.1,110.4,112.3,82.2,72.2,106.7,106.4,110,87.5,79.7,83.3,91.8,89.2,90.6,92.6) > par2 = 'grey' > par1 = '' > main = 'Histogram' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2007), Histogram (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_histogram.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/13p9e1197752120.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (is.na(par1)) { + myhist<-hist(x,col=par2) + } else { + if (par1 < 0) par1 <- 3 + if (par1 > 50) par1 <- 50 + myhist<-hist(x,breaks=par1,col=par2) + } > dev.off() null device 1 > myhist $breaks [1] 40 50 60 70 80 90 100 110 120 130 140 $counts [1] 1 0 2 7 13 14 17 14 3 1 $intensities [1] 0.001388889 0.000000000 0.002777778 0.009722222 0.018055556 0.019444444 [7] 0.023611111 0.019444444 0.004166667 0.001388889 $density [1] 0.001388889 0.000000000 0.002777778 0.009722222 0.018055556 0.019444444 [7] 0.023611111 0.019444444 0.004166667 0.001388889 $mids [1] 45 55 65 75 85 95 105 115 125 135 $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/2c2no1197752120.tab") > > system("convert tmp/13p9e1197752120.ps tmp/13p9e1197752120.png") > > > proc.time() user system elapsed 1.097 0.218 1.149