R version 2.8.1 (2008-12-22) 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(12.182 + ,12.242 + ,12.368 + ,12.552 + ,12.377 + ,12.350 + ,12.333 + ,12.427 + ,12.281 + ,12.381 + ,12.569 + ,12.684 + ,12.689 + ,12.580 + ,12.264 + ,12.259 + ,12.205 + ,12.255 + ,12.039 + ,11.893 + ,11.741 + ,12.149 + ,12.096 + ,12.146 + ,11.946 + ,11.976 + ,12.392 + ,12.102 + ,12.362 + ,12.547 + ,12.532 + ,12.422 + ,12.304 + ,12.216 + ,12.267 + ,12.652 + ,12.605 + ,12.626 + ,12.613 + ,12.603 + ,12.575 + ,12.527 + ,12.580 + ,12.325 + ,12.304 + ,12.372 + ,12.617 + ,12.627 + ,12.851 + ,12.825 + ,12.721 + ,12.765 + ,12.848 + ,12.891 + ,12.870 + ,12.831 + ,12.818 + ,13.013 + ,13.057 + ,12.969 + ,13.011 + ,12.815 + ,12.861 + ,12.746 + ,12.872 + ,12.825 + ,12.891 + ,12.993 + ,12.985 + ,13.026 + ,12.825 + ,12.598 + ,12.621 + ,12.480 + ,12.543 + ,12.594 + ,12.647 + ,12.638 + ,12.503 + ,12.392 + ,12.389 + ,12.603 + ,12.210 + ,12.278 + ,12.286 + ,12.090 + ,12.145 + ,12.307 + ,12.270 + ,12.159 + ,12.023 + ,12.062 + ,11.844 + ,11.842 + ,11.805 + ,11.809 + ,11.453 + ,11.346 + ,11.345 + ,11.382 + ,11.216 + ,11.289 + ,11.225 + ,11.382 + ,11.148 + ,11.226 + ,11.104 + ,11.051 + ,10.962 + ,11.238 + ,11.437 + ,11.495 + ,11.458 + ,11.603 + ,11.630 + ,11.341 + ,11.369 + ,11.133 + ,11.398 + ,11.578 + ,11.380 + ,11.326 + ,11.286 + ,11.604 + ,11.655 + ,11.432 + ,11.730 + ,11.782 + ,11.633 + ,11.532 + ,11.611 + ,11.660 + ,11.478 + ,11.346 + ,11.415 + ,11.427 + ,11.626 + ,11.384 + ,11.412 + ,11.500 + ,11.713 + ,11.546 + ,11.506 + ,11.532 + ,11.186 + ,11.225 + ,11.515 + ,11.234 + ,11.264 + ,11.429 + ,11.416 + ,10.906 + ,11.057 + ,10.609 + ,11.028 + ,11.394 + ,11.016 + ,10.850 + ,10.827 + ,11.019 + ,11.140 + ,10.372 + ,10.847 + ,10.826 + ,10.484 + ,10.323 + ,9.955 + ,9.437 + ,9.262 + ,8.569 + ,8.462 + ,9.389 + ,9.302 + ,8.577 + ,8.975 + ,8.852 + ,9.263 + ,9.028 + ,8.520 + ,8.683 + ,8.376 + ,8.179 + ,9.062 + ,9.005 + ,9.179 + ,9.326 + ,9.324 + ,9.617 + ,9.134 + ,8.696 + ,8.947 + ,8.864 + ,8.685 + ,8.822 + ,8.495 + ,8.273 + ,8.421 + ,7.996 + ,7.552 + ,8.048 + ,8.445 + ,8.464 + ,8.725 + ,8.827 + ,8.154 + ,8.409 + ,8.587 + ,8.376 + ,8.638 + ,8.934 + ,8.693 + ,8.750 + ,8.563 + ,8.629 + ,8.566 + ,8.922 + ,8.824 + ,8.607 + ,8.573 + ,8.519 + ,8.417 + ,8.469 + ,8.516 + ,8.488 + ,8.666 + ,8.772 + ,9.027 + ,8.955 + ,8.997 + ,8.770 + ,8.739 + ,8.599 + ,8.475 + ,8.446 + ,8.196 + ,8.216 + ,8.280 + ,7.949 + ,8.224 + ,8.109 + ,8.078 + ,8.117 + ,8.176 + ,8.373 + ,8.149 + ,8.001 + ,7.937 + ,8.070 + ,7.955 + ,8.056) > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '' > xlab = 'TIJD IN WERKDAGEN' > main = 'HISTOGRAM DOW JONES' > #'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/17v7r1236064244.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] 7.5 8.0 8.5 9.0 9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 $counts [1] 5 30 34 13 2 3 7 42 26 40 44 4 $intensities [1] 0.04000000 0.24000000 0.27200000 0.10400000 0.01600000 0.02400000 [7] 0.05600000 0.33600000 0.20800000 0.32000000 0.35200000 0.03199999 $density [1] 0.04000000 0.24000000 0.27200000 0.10400000 0.01600000 0.02400000 [7] 0.05600000 0.33600000 0.20800000 0.32000000 0.35200000 0.03199999 $mids [1] 7.75 8.25 8.75 9.25 9.75 10.25 10.75 11.25 11.75 12.25 12.75 13.25 $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/277sw1236064244.tab") > > system("convert tmp/17v7r1236064244.ps tmp/17v7r1236064244.png") > > > proc.time() user system elapsed 0.373 0.157 0.474