R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(11.95 + ,12.01 + ,11.89 + ,11.94 + ,11.555 + ,11.60 + ,11.60 + ,11.54 + ,11.10 + ,10.72 + ,11.98 + ,11.66 + ,10.26 + ,9.705 + ,9.59 + ,9.20 + ,8.79 + ,8.49 + ,8.40 + ,8.81 + ,8.54 + ,8.20 + ,8.24 + ,9.06 + ,8.90 + ,8.71 + ,8.70 + ,7.925 + ,7.57 + ,7.71 + ,7.52 + ,76.216 + ,7.69 + ,7.76 + ,7.84 + ,7.99 + ,7.83 + ,7.80 + ,7.80 + ,7.91 + ,7.76 + ,7.80 + ,8.24 + ,8.22 + ,8.225 + ,8.06 + ,8.27 + ,7.86 + ,7.50 + ,7.14 + ,7.00 + ,6.60 + ,6.305 + ,6.455 + ,69.053 + ,7.21 + ,7.415 + ,7.25 + ,7.56 + ,7.425 + ,7.42 + ,7.46 + ,7.15 + ,7.19 + ,6.715 + ,6.52 + ,6.645 + ,6.69 + ,6.71 + ,6.91 + ,7.02 + ,7.07 + ,6.94 + ,7.065 + ,7.07 + ,7.16 + ,7.35 + ,7.47 + ,7.50 + ,7.52 + ,7.56 + ,8.07 + ,8.29 + ,7.80 + ,7.62 + ,7.31 + ,7.26 + ,6.99 + ,6.95 + ,7.117 + ,7.15 + ,7.23 + ,7.375 + ,6.965 + ,6.81 + ,6.93 + ,6.86 + ,6.775 + ,6.96 + ,6.95 + ,6.92 + ,6.995 + ,7.245 + ,7.42 + ,7.40 + ,7.29 + ,7.67 + ,8.10 + ,7.69 + ,7.35 + ,7.49 + ,7.39 + ,9.13 + ,9.18 + ,8.965 + ,9.105 + ,9.855 + ,10.065 + ,10.33 + ,10.745 + ,10.60 + ,10.89 + ,10.40 + ,10.665 + ,10.61 + ,10.355 + ,10.88 + ,10.72 + ,10.34 + ,9.985 + ,9.66 + ,10.26 + ,10.33 + ,10.351 + ,11.23 + ,11.00 + ,10.71 + ,11.09 + ,11.06 + ,11.50 + ,10.99 + ,11.38 + ,11.02 + ,11.10 + ,11.80 + ,11.80 + ,11.80 + ,11.91 + ,12.01 + ,11.82 + ,12.01 + ,12.04 + ,12.80 + ,13.48 + ,14.30 + ,14.03 + ,14.14 + ,13.65 + ,13.25 + ,13.08 + ,13.34 + ,13.47 + ,13.20 + ,13.41 + ,13.42 + ,12.89 + ,13.345 + ,13.05 + ,12.93 + ,13.02 + ,12.67 + ,12.76 + ,13.01 + ,14.37 + ,14.70 + ,13.73 + ,13.67 + ,13.89 + ,14.04 + ,13.66 + ,13.78 + ,14.04 + ,14.11 + ,14.47 + ,14.38 + ,13.45 + ,13.15 + ,13.49 + ,13.11 + ,13.58 + ,13.195 + ,12.90 + ,13.125 + ,13.32 + ,13.79 + ,13.58 + ,14.165 + ,14.50 + ,14.42 + ,14.72 + ,14.67 + ,14.66 + ,14.88 + ,15.07 + ,15.39 + ,14.80 + ,14.57 + ,14.90 + ,15.44 + ,15.90 + ,16.49 + ,16.71 + ,16.575 + ,16.88 + ,17.21 + ,16.70 + ,16.63 + ,17.02 + ,16.80 + ,16.26 + ,16.30 + ,15.01 + ,15.56 + ,17.00 + ,17.57 + ,17.28 + ,17.47 + ,16.17 + ,16.44 + ,15.61 + ,15.51 + ,15.505 + ,15.34 + ,15.05 + ,15.08 + ,15.51 + ,14.50 + ,14.34 + ,14.25 + ,14.87 + ,13.915 + ,14.00 + ,13.78 + ,12.52 + ,12.89 + ,13.44 + ,15.13 + ,15.08 + ,15.48 + ,16.21 + ,16.46 + ,16.33 + ,16.64 + ,17.03 + ,17.02 + ,16.77 + ,18.58 + ,17.86 + ,17.37 + ,16.48 + ,16.00 + ,16.20 + ,16.87 + ,17.36 + ,18.19 + ,18.65 + ,19.21 + ,19.13 + ,18.29 + ,18.49 + ,17.58 + ,18.05 + ,18.83 + ,18.89 + ,18.97 + ,18.85 + ,18.91 + ,19.30 + ,20.20 + ,21.30 + ,21.28 + ,20.72 + ,22.27 + ,23.49 + ,22.77 + ,22.31 + ,22.31 + ,23.21 + ,22.40 + ,23.97 + ,23.61 + ,23.88 + ,24.41 + ,23.23 + ,23.36 + ,24.42 + ,23.595 + ,21.00 + ,20.50 + ,20.30 + ,21.16 + ,21.898 + ,22.65 + ,21.68 + ,21.32 + ,21.26 + ,21.54 + ,22.73 + ,23.72 + ,23.93 + ,29.54 + ,29.72 + ,30.13 + ,30.17 + ,29.68 + ,31.31 + ,31.90 + ,30.97 + ,30.12 + ,31.85 + ,32.49 + ,32.55 + ,30.73 + ,29.18 + ,28.22 + ,28.57 + ,27.50 + ,26.51 + ,26.69 + ,25.76 + ,26.79 + ,26.93 + ,27.11 + ,24.56 + ,24.18 + ,22.10 + ,23.12 + ,21.87 + ,23.39 + ,23.59 + ,25.33 + ,24.15 + ,24.79 + ,25.00 + ,25.46 + ,25.71 + ,27.39 + ,26.67 + ,27.91 + ,27.92 + ,26.64 + ,26.77 + ,26.68 + ,27.52 + ,27.27 + ,28.15 + ,28.48 + ,28.05 + ,28.98 + ,29.03 + ,27.72 + ,28.92 + ,28.93 + ,28.85 + ,28.78 + ,28.24 + ,28.17 + ,28.57 + ,29.77 + ,28.40 + ,28.55 + ,25.89 + ,27.75 + ,35.33 + ,35.17 + ,35.76 + ,36.20 + ,36.56 + ,37.61 + ,36.73 + ,37.82 + ,38.91 + ,38.98 + ,40.43 + ,40.30 + ,42.85 + ,43.60 + ,43.57 + ,43.14 + ,43.11 + ,43.52 + ,43.52 + ,44.23 + ,45.43 + ,43.78 + ,42.86 + ,43.24 + ,43.79 + ,44.18 + ,45.26 + ,45.01 + ,45.99 + ,47.29 + ,47.37 + ,48.24 + ,48.10 + ,48.65 + ,56.59 + ,55.57 + ,55.20 + ,53.44 + ,53.77 + ,54.46 + ,53.22 + ,54.83 + ,53.40 + ,53.92 + ,54.83 + ,53.72 + ,54.64 + ,54.78 + ,55.13 + ,55.71 + ,54.40 + ,54.79 + ,56.08 + ,56.54 + ,57.03 + ,57.05 + ,55.99 + ,56.89 + ,64.09 + ,62.12 + ,62.41 + ,62.17 + ,60.91 + ,60.85 + ,59.84 + ,61.09 + ,62.35 + ,63.38 + ,62.60 + ,64.80 + ,64.78 + ,64.86 + ,66.47 + ,68.45 + ,65.83 + ,66.40 + ,66.20 + ,65.99 + ,65.79 + ,65.17 + ,67.42 + ,69.86 + ,69.69 + ,68.35 + ,65.30 + ,65.54 + ,66.87 + ,66.88 + ,63.57 + ,63.60 + ,63.20 + ,63.69 + ,62.67 + ,61.11 + ,60.40 + ,59.11 + ,60.15 + ,61.98 + ,62.00 + ,61.40 + ,62.69 + ,61.55 + ,62.40 + ,63.28 + ,65.22 + ,64.77 + ,64.01 + ,63.53 + ,62.89 + ,62.09 + ,61.68 + ,61.37 + ,61.92 + ,59.10 + ,58.94 + ,58.13 + ,58.07 + ,58.17 + ,58.02 + ,58.47 + ,58.65 + ,58.69 + ,58.24 + ,58.48 + ,60.20 + ,59.24 + ,59.18 + ,60.45 + ,60.81 + ,62.15) > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '30' > xlab = 'Dollar/aandeel' > main = 'RIM' > par4 <- 'Unknown' > par3 <- 'FALSE' > par2 <- 'grey' > par1 <- '30' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Histogram (v1.0.12) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_histogram.wasp/ > #Source of accompanying publication: > # > 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/wessaorg/rcomp/tmp/1mccf1355153498.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(is.numeric(x[1])) { + 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) + } + } else { + plot(mytab <- table(x),col=par2,main='Frequency Plot',xlab=xlab,ylab='Absolute Frequency') + } > dev.off() null device 1 > if(is.numeric(x[1])) { + myhist + n <- length(x) + + #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab + load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/23ilr1355153498.tab") + } else { + mytab + reltab <- mytab / sum(mytab) + n <- length(mytab) + + #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab + load(file="/var/wessaorg/rcomp/createtable") + + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Frequency Table (Categorical Data)',3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Category',header=TRUE) + a<-table.element(a,'Abs. Frequency',header=TRUE) + a<-table.element(a,'Rel. Frequency',header=TRUE) + a<-table.row.end(a) + for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,labels(mytab)$x[i],header=TRUE) + a<-table.element(a,mytab[i]) + a<-table.element(a,round(reltab[i],4)) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/3cbwf1355153499.tab") + } > > try(system("convert tmp/1mccf1355153498.ps tmp/1mccf1355153498.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.970 0.200 1.149