R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(3.594 + ,3.617 + ,3.647 + ,3.761 + ,3.767 + ,3.692 + ,3.709 + ,3.716 + ,3.755 + ,3.702 + ,3.698 + ,3.765 + ,3.809 + ,3.777 + ,3.747 + ,3.695 + ,3.719 + ,3.714 + ,3.740 + ,3.632 + ,3.643 + ,3.615 + ,3.747 + ,3.687 + ,3.700 + ,3.578 + ,3.608 + ,3.711 + ,3.599 + ,3.721 + ,3.683 + ,3.668 + ,3.715 + ,3.673 + ,3.701 + ,3.846 + ,3.853 + ,3.807 + ,3.860 + ,3.854 + ,3.842 + ,3.826 + ,3.863 + ,3.763 + ,3.789 + ,3.822 + ,3.877 + ,3.867 + ,3.940 + ,3.864 + ,3.859 + ,3.868 + ,3.887 + ,3.908 + ,3.936 + ,3.891 + ,3.962 + ,3.947 + ,3.909 + ,3.897 + ,3.878 + ,3.841 + ,3.841 + ,3.842 + ,3.836 + ,3.821 + ,3.815 + ,3.805 + ,3.815 + ,3.803 + ,3.722 + ,3.745 + ,3.681 + ,3.684 + ,3.676 + ,3.725 + ,3.734 + ,3.747 + ,3.683 + ,3.715 + ,3.717 + ,3.772 + ,3.655 + ,3.615 + ,3.634 + ,3.540 + ,3.580 + ,3.598 + ,3.577 + ,3.568 + ,3.493 + ,3.446 + ,3.376 + ,3.345 + ,3.336 + ,3.341 + ,3.196 + ,3.191 + ,3.157 + ,3.111 + ,3.054 + ,3.109 + ,3.041 + ,3.017 + ,3.045 + ,3.037 + ,3.043 + ,2.992 + ,2.946 + ,2.883 + ,2.988 + ,2.950 + ,3.054 + ,3.083 + ,3.125 + ,3.175 + ,3.066 + ,3.054 + ,2.969 + ,3.007 + ,3.021 + ,2.982 + ,2.987 + ,2.964 + ,3.084 + ,3.060 + ,3.026 + ,3.083 + ,3.089 + ,3.090 + ,3.065 + ,3.072 + ,3.070 + ,3.057 + ,3.009 + ,2.990 + ,2.984 + ,3.014 + ,2.987 + ,3.025 + ,3.030 + ,3.097 + ,3.118 + ,3.153 + ,3.189 + ,3.173 + ,3.044 + ,3.148 + ,3.123 + ,3.092 + ,3.051 + ,3.054 + ,2.995 + ,2.942 + ,2.957 + ,2.772 + ,2.984 + ,3.060 + ,2.943 + ,2.914 + ,2.869 + ,2.879 + ,2.783 + ,2.473 + ,2.728 + ,2.735 + ,2.743 + ,2.638 + ,2.616 + ,2.380 + ,2.354 + ,2.095 + ,2.248 + ,2.443 + ,2.183 + ,1.978 + ,2.040 + ,2.079 + ,2.155 + ,2.052 + ,1.983 + ,1.908 + ,1.861 + ,1.895 + ,2.002 + ,2.091 + ,2.033 + ,2.132 + ,2.170 + ,2.239 + ,2.162 + ,2.130 + ,2.202 + ,2.171 + ,2.168 + ,2.032 + ,2.125 + ,2.070 + ,2.033 + ,2.042 + ,1.899 + ,1.873 + ,1.805 + ,1.819 + ,1.843 + ,1.839 + ,1.875 + ,1.879 + ,1.764 + ,1.834 + ,1.847 + ,1.835 + ,1.874 + ,1.882 + ,1.885 + ,1.904 + ,1.819 + ,1.874 + ,1.863 + ,1.887 + ,1.861 + ,1.884 + ,1.865 + ,1.853 + ,1.861 + ,1.870 + ,1.899 + ,1.916 + ,1.941 + ,2.003 + ,2.008 + ,1.991 + ,1.975 + ,1.980 + ,1.974 + ,1.973 + ,1.982 + ,1.886 + ,1.884 + ,1.884 + ,1.848 + ,1.782 + ,1.838 + ,1.814 + ,1.846 + ,1.893 + ,1.894 + ,1.929 + ,1.887 + ,1.896 + ,1.869 + ,1.897 + ,1.879 + ,1.919) > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '' > xlab = 'TIJD IN WERKDAGEN' > main = 'HISTOGRAM BEL 20' > #'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/freestat/rcomp/tmp/1p9iq1235901740.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] 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 $counts [1] 2 55 22 5 2 7 20 45 4 10 48 34 $intensities [1] 0.03937008 1.08267717 0.43307087 0.09842520 0.03937008 0.13779528 [7] 0.39370079 0.88582677 0.07874016 0.19685039 0.94488189 0.66929120 $density [1] 0.03937008 1.08267717 0.43307087 0.09842520 0.03937008 0.13779528 [7] 0.39370079 0.88582677 0.07874016 0.19685039 0.94488189 0.66929120 $mids [1] 1.7 1.9 2.1 2.3 2.5 2.7 2.9 3.1 3.3 3.5 3.7 3.9 $xname [1] "x" $equidist [1] TRUE attr(,"class") [1] "histogram" > n <- length(x) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/2bsoo1235901740.tab") > > system("convert tmp/1p9iq1235901740.ps tmp/1p9iq1235901740.png") > > > proc.time() user system elapsed 0.552 0.211 0.653