R version 2.6.0 (2007-10-03) 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(99.80,103.50,103.10,105.60,105.70,106.60,107.00,105.20,105.70,105.00,105.10,105.90,105.30,104.90,103.20,103.40,104.40,104.50,105.90,110.60,112.40,111.80,111.00,111.00,109.10,107.80,107.20,108.40,107.50,106.40,106.20,104.90,106.20,107.60,107.00,104.50,105.10,104.70,103.70,104.90,105.90,106.10,106.10,106.80,106.40,107.80,107.60,107.60,108.40,109.50,109.20,109.10,110.00,109.00,109.00,111.90,109.30,112.10,112.10,112.50,113.60,112.90,114.00,116.10,116.50,117.10,117.10,117.10,116.50,116.50,116.30,116.50,119.20,118.60,117.50,117.10,117.60,118.30,118.60,116.70) > 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/1uxo21194985195.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] 98 100 102 104 106 108 110 112 114 116 118 120 $counts [1] 1 0 5 18 17 10 5 7 0 13 4 $intensities [1] 0.006249999 0.000000000 0.031250000 0.112500000 0.106250000 0.062500000 [7] 0.031250000 0.043750000 0.000000000 0.081250000 0.025000000 $density [1] 0.006249999 0.000000000 0.031250000 0.112500000 0.106250000 0.062500000 [7] 0.031250000 0.043750000 0.000000000 0.081250000 0.025000000 $mids [1] 99 101 103 105 107 109 111 113 115 117 119 $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/2tzl81194985196.tab") > > system("convert tmp/1uxo21194985195.ps tmp/1uxo21194985195.png") > > > proc.time() user system elapsed 0.621 0.159 0.691