R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(100 + ,97.56592292 + ,93.71196755 + ,92.69776876 + ,89.65517241 + ,89.04665314 + ,98.98580122 + ,105.6795132 + ,101.6227181 + ,98.37728195 + ,94.11764706 + ,93.30628803 + ,94.72616633 + ,93.30628803 + ,90.87221095 + ,89.85801217 + ,88.43813387 + ,87.42393509 + ,98.17444219 + ,103.4482759 + ,104.0567951 + ,102.0283976 + ,95.53752535 + ,95.53752535 + ,96.55172414 + ,96.34888438 + ,95.3346856 + ,93.50912779 + ,92.29208925 + ,92.49492901 + ,104.8681542 + ,106.4908722 + ,106.0851927 + ,105.2738337 + ,103.2454361 + ,103.8539554 + ,105.2738337 + ,104.8681542 + ,103.4482759 + ,103.2454361 + ,101.6227181 + ,102.8397566 + ,115.4158215 + ,117.6470588 + ,117.2413793 + ,114.6044625 + ,110.9533469 + ,112.5760649 + ,113.9959432 + ,113.7931034 + ,112.5760649 + ,110.3448276 + ,108.9249493 + ,110.1419878 + ,120.4868154 + ,123.9350913 + ,124.3407708 + ,123.9350913 + ,120.4868154 + ,120.6896552 + ,119.8782961 + ,119.4726166 + ,118.4584178 + ,116.2271805 + ,115.010142 + ,115.4158215 + ,125.9634888 + ,127.5862069 + ,127.3833671 + ,124.137931 + ,120.6896552 + ,121.0953347 + ,120.2839757 + ,119.6754564 + ,117.6470588 + ,116.4300203 + ,116.2271805 + ,116.2271805 + ,125.7606491 + ,126.9776876 + ,125.7606491 + ,119.2697769 + ,114.8073022 + ,112.9817444 + ,113.7931034 + ,111.3590264 + ,107.9107505 + ,106.693712 + ,103.6511156 + ,101.2170385 + ,112.5760649 + ,114.6044625 + ,109.9391481 + ,106.8965517 + ,103.4482759 + ,104.2596349 + ,104.8681542 + ,103.0425963 + ,100 + ,99.39148073 + ,95.13184584 + ,96.95740365 + ,107.0993915 + ,108.31643 + ,105.0709939 + ,102.6369168 + ,101.8255578 + ,104.6653144) > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '' > 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) > if (par3 == 'TRUE') par3 <- TRUE > if (par3 == 'FALSE') par3 <- FALSE > if (par4 == 'Unknown') par1 <- as.numeric(par1) > if (par4 == 'Interval/Ratio') par1 <- as.numeric(par1) > if (par4 == '3-point Likert') par1 <- c(1:3 - 0.5, 3.5) > if (par4 == '4-point Likert') par1 <- c(1:4 - 0.5, 4.5) > if (par4 == '5-point Likert') par1 <- c(1:5 - 0.5, 5.5) > if (par4 == '6-point Likert') par1 <- c(1:6 - 0.5, 6.5) > if (par4 == '7-point Likert') par1 <- c(1:7 - 0.5, 7.5) > if (par4 == '8-point Likert') par1 <- c(1:8 - 0.5, 8.5) > if (par4 == '9-point Likert') par1 <- c(1:9 - 0.5, 9.5) > if (par4 == '10-point Likert') par1 <- c(1:10 - 0.5, 10.5) > postscript(file="/var/www/html/rcomp/tmp/1ynn71260800818.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,right=par3) + } else { + if (par1 < 0) par1 <- 3 + if (par1 > 50) par1 <- 50 + myhist<-hist(x,breaks=par1,col=par2,main=main,xlab=xlab,right=par3) + } > dev.off() null device 1 > myhist $breaks [1] 85 90 95 100 105 110 115 120 125 130 $counts [1] 5 10 12 23 13 14 15 10 6 $intensities [1] 0.00925926 0.01851852 0.02222222 0.04259259 0.02407407 0.02592593 0.02777778 [8] 0.01851852 0.01111111 $density [1] 0.00925926 0.01851852 0.02222222 0.04259259 0.02407407 0.02592593 0.02777778 [8] 0.01851852 0.01111111 $mids [1] 87.5 92.5 97.5 102.5 107.5 112.5 117.5 122.5 127.5 $xname [1] "x" $equidist [1] TRUE attr(,"class") [1] "histogram" > n <- length(x) > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > 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 > if (par3 == FALSE) mybracket <- '[' else mybracket <- ']' > mynumrows <- (length(myhist$breaks)-1) > for (i in 1:mynumrows) { + a<-table.row.start(a) + if (i == 1) + dum <- paste('[',myhist$breaks[i],sep='') + else + dum <- paste(mybracket,myhist$breaks[i],sep='') + dum <- paste(dum,myhist$breaks[i+1],sep=',') + if (i==mynumrows) + dum <- paste(dum,']',sep='') + else + dum <- paste(dum,mybracket,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/25vns1260800819.tab") > > try(system("convert tmp/1ynn71260800818.ps tmp/1ynn71260800818.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.368 0.150 0.444