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(92.81,59.04,72.81,91.81,68.07,49.16,124.61,109.89,110.51,114.77,92.37,103.63,90.43,65.86,83.33,94.49,68.98,55.46,132.89,121.71,127.01,134.04,106.48,117.55,101.61,82.66,89.28,109.24,88.16,59.23,164.21,125.13,152.68,132.96,112.42,136.43,107.32,87.61,97.86,106.60,92.17,65.31,161.49,162.25,175.13,147.28,144.48,122.67,102.27,88.64,89.59,112.20,91.98,57.85,160.49,128.33,140.69,126.61,129.27,124.27,112.90,92.54,85.70,116.72,92.08,58.98,154.50,145.55,146.60,143.51,113.52,104.80) > 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/1186i1197751425.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 60 80 100 120 140 160 180 $counts [1] 6 5 18 17 13 8 5 $intensities [1] 0.004166666 0.003472222 0.012500000 0.011805556 0.009027778 0.005555556 [7] 0.003472222 $density [1] 0.004166666 0.003472222 0.012500000 0.011805556 0.009027778 0.005555556 [7] 0.003472222 $mids [1] 50 70 90 110 130 150 170 $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/27j2x1197751425.tab") > > system("convert tmp/1186i1197751425.ps tmp/1186i1197751425.png") > > > proc.time() user system elapsed 0.595 0.151 0.646