R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(749.50 + ,1074.75 + ,1499.67 + ,1124.75 + ,499.67 + ,799.50 + ,1333.00 + ,1333.00 + ,1166.33 + ,533.20 + ,583.17 + ,499.67 + ,874.75 + ,666.33 + ,666.33 + ,433.00 + ,1099.00 + ,1299.00 + ,732.67 + ,433.00 + ,1166.33 + ,999.75 + ,599.67 + ,999.80 + ,899.80 + ,1333.00 + ,799.80 + ,624.75 + ,999.80 + ,399.80 + ,1159.00 + ,799.80 + ,1333.00 + ,999.67 + ,899.80 + ,653.20 + ,833.00 + ,533.20 + ,499.75 + ,666.33 + ,714.00 + ,533.20 + ,666.33 + ,766.33 + ,499.75 + ,499.75 + ,666.33 + ,499.80 + ,479.60 + ,999.67 + ,999.67 + ,1199.00 + ,1124.75 + ,499.90 + ,1099.00 + ,999.80 + ,699.50 + ,1159.00 + ,1266.33 + ,499.90 + ,739.80 + ,799.60 + ,999.67 + ,416.46 + ,826.00 + ,599.80 + ,499.67 + ,1074.75 + ,1249.75 + ,399.67 + ,699.80 + ,1666.33 + ,888.33 + ,866.00 + ,799.80 + ,1499.67 + ,799.80 + ,732.67 + ,933.00 + ,649.50 + ,499.67 + ,1333.00 + ,999.75 + ,1124.75 + ,1299.00 + ,999.67 + ,399.67 + ,999.75 + ,1239.00 + ,499.67 + ,433.00 + ,1466.33 + ,1249.75 + ,433.00 + ,999.80 + ,599.87 + ,1199.75 + ,999.75 + ,626.53 + ,959.80 + ,1166.33 + ,1166.33 + ,999.75 + ,499.67 + ,399.92 + ,899.80 + ,1599.67 + ,266.33 + ,1199.00 + ,1279.00 + ,1333.00 + ,1199.00 + ,1299.00 + ,1333.00 + ,266.53 + ,399.87 + ,1320.00 + ,999.80 + ,599.67 + ,1124.75 + ,899.80 + ,1159.00 + ,599.87 + ,1333.00 + ,833.00 + ,1239.00 + ,1159.00 + ,1566.33 + ,874.75 + ,1333.00 + ,1199.00 + ,999.67 + ,1099.00 + ,249.95 + ,1259.00 + ,999.80 + ,779.50 + ,1016.10 + ,729.50 + ,639.50 + ,999.80 + ,119.90 + ,999.80 + ,1199.00 + ,833.00 + ,1499.67 + ,399.60 + ,732.67 + ,1433.00 + ,999.80 + ,1159.00 + ,766.33 + ,999.80 + ,1666.33 + ,566.33 + ,333.00 + ,949.75 + ,449.90 + ,1166.33 + ,933.00 + ,1166.33 + ,1074.75 + ,439.60 + ,399.60 + ,999.75 + ,999.17 + ,1199.00 + ,706.00 + ,1199.75 + ,533.20 + ,499.75 + ,1166.33 + ,999.17 + ,1099.00 + ,1099.00 + ,533.20 + ,1239.00 + ,999.60 + ,533.20 + ,866.00 + ,1498.75 + ,599.60 + ,999.67 + ,1359.00 + ,499.90 + ,999.67 + ,1199.00 + ,799.80 + ,1039.00 + ,1099.67 + ,1166.33 + ,466.33 + ,279.92 + ,999.80 + ,1259.00 + ,899.80 + ,1059.00 + ,1074.75 + ,499.75 + ,499.80 + ,732.67 + ,1099.00 + ,666.53 + ,759.80 + ,1333.00 + ,1499.00 + ,1266.33 + ,2266.67 + ,932.67 + ,699.50 + ,1499.67 + ,649.50 + ,1159.00 + ,949.75 + ,1433.00 + ,999.75 + ,499.67 + ,89.90 + ,1099.00 + ,999.67 + ,599.67 + ,333.20 + ,333.20 + ,999.80 + ,1074.75 + ,1199.00 + ,824.75 + ,965.83 + ,1099.00 + ,299.75 + ,749.50 + ,1499.67 + ,1099.67 + ,999.80 + ,333.20 + ,1499.00 + ,1333.00 + ,649.50 + ,499.67 + ,859.80 + ,833.17 + ,1333.00 + ,732.67 + ,799.50 + ,1333.00 + ,1499.67 + ,333.00 + ,499.67 + ,1499.67 + ,466.33 + ,499.75 + ,607.92 + ,639.50 + ,1333.00 + ,666.50 + ,799.80 + ,890.00 + ,343.92 + ,1333.00 + ,589.50 + ,799.80 + ,599.87 + ,999.80 + ,1199.00 + ,199.80 + ,1333.00 + ,1499.67 + ,712.00 + ,799.80 + ,1099.00 + ,1124.75 + ,1099.00 + ,1099.00 + ,866.00 + ,1499.67 + ,399.60 + ,399.60 + ,1199.00 + ,833.17 + ,1199.00 + ,1199.00 + ,999.80 + ,766.33 + ,850.00 + ,1333.00 + ,1433.00 + ,1259.00 + ,1499.67 + ,999.80 + ,1765.00 + ,1765.00 + ,1433.00 + ,999.80 + ,899.80 + ,1433.00 + ,699.50 + ,999.80 + ,1765.00 + ,259.80 + ,1099.00 + ,830.00 + ,679.00 + ,399.60 + ,1099.00 + ,333.00 + ,424.75 + ,699.50 + ,932.67 + ,666.53 + ,999.80 + ,1765.00 + ,499.67 + ,499.67 + ,799.50 + ,499.83 + ,299.90 + ,732.67 + ,1059.00 + ,999.00 + ,959.80 + ,1499.67 + ,866.00 + ,199.80 + ,649.50 + ,1333.00 + ,2380.00 + ,533.20 + ,799.50 + ,1333.00 + ,686.88 + ,1266.67 + ,939.80 + ,1059.00 + ,433.00 + ,699.50 + ,936.88 + ,866.00 + ,1059.00 + ,920.00 + ,1333.00 + ,1765.00 + ,1099.00 + ,449.90 + ,555.44 + ,649.50 + ,1166.33 + ,299.90 + ,1249.75 + ,1059.00 + ,732.67 + ,1433.00 + ,999.67 + ,499.67 + ,2026.67 + ,666.53 + ,999.00 + ,999.00 + ,1166.33 + ,499.67 + ,119.90 + ,866.00 + ,1199.00 + ,1099.00 + ,249.90 + ,333.00 + ,920.00 + ,533.20 + ,359.92 + ,333.00 + ,186.00 + ,266.00 + ,920.00 + ,499.90 + ,599.67 + ,999.80 + ,219.00 + ,1166.33 + ,589.50 + ,699.50 + ,1099.00 + ,939.80 + ,830.00 + ,890.00 + ,433.00 + ,299.90 + ,199.80 + ,799.33 + ,333.00 + ,466.33 + ,999.00 + ,699.50 + ,680.00 + ,1159.00 + ,1159.00 + ,299.80 + ,559.80 + ,599.50 + ,619.80 + ,866.00 + ,399.60 + ,333.00 + ,999.80 + ,3700.00 + ,850.00 + ,999.80 + ,129.90 + ,999.80 + ,1166.33 + ,498.33 + ,1099.00 + ,1199.00 + ,699.80 + ,1399.00 + ,899.80 + ,999.80 + ,1333.00 + ,279.90 + ,1400.00 + ,433.00 + ,999.33 + ,990.00 + ,299.90 + ,870.00 + ,399.90 + ,1099.00 + ,729.50 + ,666.53 + ,1099.00 + ,419.80 + ,269.90 + ,799.80 + ,665.00 + ,433.00 + ,499.67 + ,999.33 + ,4700.00 + ,666.53 + ,970.00 + ,1166.33 + ,911.88 + ,1399.00 + ,899.67 + ,666.53 + ,1771.43 + ,729.50 + ,1999.60 + ,259.80 + ,433.00 + ,1139.00 + ,729.50 + ,599.67 + ,860.00 + ,624.75 + ,899.80 + ,433.00 + ,799.33 + ,1199.00 + ,1399.00 + ,3700.00 + ,3700.00 + ,4500.00 + ,3900.00 + ,3900.00 + ,533.00 + ,541.25 + ,259.80 + ,279.80 + ,2026.67 + ,199.80 + ,599.67 + ,999.67 + ,939.80 + ,789.50 + ,1433.00 + ,331.67 + ,3900.00 + ,3900.00 + ,3900.00 + ,599.67 + ,1499.00 + ,1199.67 + ,559.60 + ,599.67 + ,199.80 + ,866.00 + ,599.80 + ,1099.67 + ,811.88 + ,199.80 + ,959.80 + ,433.00 + ,1498.00 + ,1230.00 + ,1960.00 + ,231.80 + ,833.17 + ,1159.00 + ,999.67 + ,1333.00 + ,629.50 + ,933.00 + ,932.67 + ,1599.67 + ,1399.00 + ,1499.00 + ,990.00 + ,990.00 + ,4300.00 + ,4500.00 + ,3900.00 + ,4300.00 + ,4333.33 + ,1230.00 + ,1230.00 + ,1059.00 + ,1960.00 + ,1960.00 + ,1750.00 + ,3700.00 + ,499.80 + ,777.22 + ,3550.00 + ,999.67 + ,729.50 + ,1099.67 + ,559.80 + ,899.80 + ,999.80 + ,89.90 + ,990.00 + ,970.00 + ,4333.33 + ,1190.00 + ,3800.00 + ,3700.00 + ,324.75 + ,1650.00 + ,199.80 + ,721.67 + ,333.20 + ,649.50 + ,833.00 + ,366.56 + ,1099.00 + ,649.50 + ,1299.00 + ,1139.00 + ,659.80 + ,699.50 + ,792.00 + ,799.50 + ,1166.33 + ,1266.33 + ,1059.00 + ,2026.67 + ,1399.00 + ,911.88 + ,1099.00 + ,1299.00 + ,199.00 + ,1700.00 + ,1700.00 + ,749.50 + ,374.75 + ,79.93 + ,499.67 + ,599.67 + ,1199.00 + ,811.88 + ,2026.67 + ,899.80 + ,239.92 + ,1099.67 + ,1099.00 + ,719.80 + ,64.95 + ,890.00 + ,799.33 + ,890.00 + ,1628.57 + ,799.50 + ,2026.67 + ,199.80 + ,2026.67 + ,2026.67 + ,1439.00 + ,1399.00 + ,1332.50 + ,1099.00 + ,833.00 + ,599.67 + ,199.80 + ,1266.33 + ,890.00 + ,890.00 + ,3700.00 + ,324.75 + ,1780.00 + ,3800.00 + ,386.53 + ,133.20 + ,1079.00 + ,429.90 + ,3633.33 + ,499.67 + ,2200.00 + ,3800.00 + ,1650.00 + ,199.80 + ,319.80 + ,49.95 + ,699.50 + ,1433.00 + ,799.50 + ,1099.00 + ,799.50 + ,933.00 + ,199.80 + ,1720.00 + ,599.67 + ,1760.00 + ,1800.00 + ,283.17 + ,59.95 + ,799.50 + ,2026.67 + ,2026.67 + ,1700.00 + ,699.50 + ,899.80 + ,1439.00 + ,1099.00 + ,911.88 + ,3900.00 + ,999.75 + ,859.80 + ,2600.00 + ,840.00 + ,1760.00 + ,1760.00 + ,599.67 + ,339.80 + ,339.80 + ,199.80 + ,950.00 + ,1099.00 + ,999.67 + ,2400.00 + ,2200.00 + ,549.50 + ,1099.67 + ,1599.67 + ,649.50 + ,2550.00 + ,699.50 + ,579.50 + ,789.50 + ,789.50 + ,789.50 + ,555.44 + ,199.80 + ,1099.00 + ,1099.00 + ,1099.00 + ,999.80 + ,996.00 + ,999.80 + ,699.50 + ,789.50 + ,1399.00 + ,199.80 + ,996.00 + ,996.00 + ,996.00 + ,996.00 + ,699.50 + ,333.00 + ,199.80 + ,199.80 + ,199.80 + ,199.80 + ,699.50 + ,199.80 + ,199.80 + ,1166.33 + ,766.33 + ,199.80 + ,719.50) > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '20' > xlab = 'x' > main = 'Histogram' > par4 <- 'Unknown' > par3 <- 'FALSE' > par2 <- 'grey' > par1 <- '20' > #'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/19iiy1417018311.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/2o6lf1417018311.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/3oucg1417018311.tab") + } > > try(system("convert tmp/19iiy1417018311.ps tmp/19iiy1417018311.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.799 0.119 0.917