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(2430.47 + ,2516.3 + ,2633.63 + ,2799.84 + ,3001.93 + ,3229.29 + ,3173.02 + ,3322.08 + ,3417.88 + ,3486.95 + ,3016.22 + ,2709.61 + ,2914.87 + ,3203.08 + ,3320.25 + ,3446.25 + ,3456.85 + ,3566.53 + ,3763.67 + ,3607.75 + ,3747.38 + ,3623.91 + ,3699.76 + ,3629.61 + ,3911.52 + ,4281.47 + ,4742.42 + ,4522.42 + ,4879.79 + ,5059.11 + ,5093.19 + ,4941.81 + ,4832.67 + ,4876.18 + ,5018.07 + ,4780.34 + ,4953.59 + ,4622.32 + ,4557.13 + ,4560.03 + ,4105.66 + ,4004.89 + ,4277.26 + ,4245.98 + ,4057.64 + ,3931.42 + ,3637.15 + ,3339.91 + ,3465.74 + ,3571.25 + ,3706.93 + ,3584.17 + ,3552.11 + ,3695.24 + ,3510 + ,3357.7 + ,3060.91 + ,2736.98 + ,2709.45 + ,2314.96 + ,2561.29 + ,2663.49 + ,2407.87 + ,2237.74 + ,2165.44 + ,2098.89 + ,2318.54 + ,2315.49 + ,2395.47 + ,2474.07 + ,2479.57 + ,2386.92 + ,2537.84 + ,2567.13 + ,2660.37 + ,2696.28 + ,2748.5 + ,2663.32 + ,2707.69 + ,2669.36 + ,2687.68 + ,2650.24 + ,2620.03 + ,2668.47 + ,2692.06 + ,2737.67 + ,2774.77 + ,2819.19 + ,2892.56 + ,2866.08 + ,2817.41 + ,2934.75 + ,3036.54 + ,3139.5 + ,3114.31 + ,3261.3 + ,3201.79 + ,3264.53 + ,3349.1 + ,3446.17 + ,3469.48 + ,3507.13 + ,3536.2 + ,3359.05 + ,3378.85 + ,3449.15 + ,3522.89 + ,3551.04 + ,3669.15 + ,3602 + ,3697.22 + ,3760.9 + ,3665.08 + ,3708.8 + ,3858.21 + ,3933.16 + ,3946.98 + ,3794.29 + ,3765.56 + ,3820.33 + ,3885.12 + ,3752.67 + ,3683.79 + ,3240.75 + ,3188.82 + ,3017.98 + ,3237.2 + ,3182.53 + ,2906.42 + ,2881.35 + ,2915.64 + ,2635.13 + ,2331.43 + ,2159.04 + ,2065.46 + ,1983.48 + ,1770.41 + ,1815.99 + ,2026.97 + ,2124.81 + ,2098.28 + ,2291.39 + ,2401.57 + ,2453.89 + ,2409.53) > 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/1priz1260623001.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] 1500 2000 2500 3000 3500 4000 4500 5000 5500 $counts [1] 3 22 33 32 35 6 11 3 $intensities [1] 4.137931e-05 3.034483e-04 4.551724e-04 4.413793e-04 4.827586e-04 [6] 8.275862e-05 1.517241e-04 4.137930e-05 $density [1] 4.137931e-05 3.034483e-04 4.551724e-04 4.413793e-04 4.827586e-04 [6] 8.275862e-05 1.517241e-04 4.137930e-05 $mids [1] 1750 2250 2750 3250 3750 4250 4750 5250 $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/2a14x1260623001.tab") > > system("convert tmp/1priz1260623001.ps tmp/1priz1260623001.png") > > > proc.time() user system elapsed 0.377 0.155 0.432