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(2585,3368,3210,3111,3756,4216,5225,4426,3932,3816,3661,3795,2285,2934,2985,3646,4198,4935,5618,5454,3624,2898,3802,3629,2369,2511,3079,3728,4151,4326,5054,5138,3310,3508,3790,3446,2127,2523,3017,3265,3822,4027,4420,5255,4009,3074,3465,3718,1954,2604,3626,2836,4042,3584,4225,4523,2892,2876,3420,3159,2101,2181,2724,2954,4092,3470,3990,4239,2855,2897,3433,3307,1914,2214,2320,2714,3633,3295,4377,4442,2774,2840,2828,3758,1610,1968,2248,3262,3164,2972,4041,3402,2898,2555,3056,3717,1755,2193,2198,2777,3076,3389,4231,3118,2524,2280,2862,3502,1558,1940,2226,2676,3145,3224,4117,3446,2482,2349,2986,3163,1651,1725,2622,2316,2976,3263,3951,2917,2380,2458,2883,2579,1330,1686,2457,2514,2834,2757,3425,3006,2369,2017,2507,3168,1545,1643,2112,2415,2862,2822,3260,2606,2264,2250,2545,2856,1208,1412,1964,2018,2329,2660,2923,2626,2132,1772,2526,2755,1154,1568,1965,2659,2354,2592,2714,2294,2416,2016,2799,2467,1153,1482,1818,2262,2612,2967,3179) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = 'Unknown' > par3 = 'FALSE' > par2 = 'grey' > par1 = '' > ylab = '' > xlab = '' > main = '' > #'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/10gj21234973746.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] 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 $counts [1] 6 17 33 51 33 22 17 2 5 1 $intensities [1] 6.417112e-05 1.818182e-04 3.529412e-04 5.454545e-04 3.529412e-04 [6] 2.352941e-04 1.818182e-04 2.139037e-05 5.347594e-05 1.069519e-05 $density [1] 6.417112e-05 1.818182e-04 3.529412e-04 5.454545e-04 3.529412e-04 [6] 2.352941e-04 1.818182e-04 2.139037e-05 5.347594e-05 1.069519e-05 $mids [1] 1250 1750 2250 2750 3250 3750 4250 4750 5250 5750 $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/26pyd1234973746.tab") > > system("convert tmp/10gj21234973746.ps tmp/10gj21234973746.png") > > > proc.time() user system elapsed 0.379 0.154 9.268