R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-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(131676 + ,135050 + ,129070 + ,137792 + ,139762 + ,142917 + ,144198 + ,142648 + ,152170 + ,136022 + ,138142 + ,138135 + ,135027 + ,132911 + ,133976 + ,137012 + ,119610 + ,118106 + ,120383 + ,133185 + ,131416 + ,134248 + ,134397 + ,127728 + ,131837 + ,125955 + ,134187 + ,143291 + ,145074 + ,149812 + ,144668 + ,147253 + ,145568 + ,155564 + ,155872 + ,156323 + ,158010 + ,155598 + ,154785 + ,157294 + ,162938 + ,157283 + ,166074 + ,169282 + ,172552 + ,174055 + ,175409 + ,173696 + ,171283 + ,173322 + ,170717 + ,174229 + ,175339 + ,173511 + ,175839 + ,173816 + ,173990 + ,174777 + ,174819 + ,176726 + ,176199 + ,180952 + ,176663 + ,182346 + ,180605 + ,182497 + ,187856 + ,190020 + ,190108 + ,193288 + ,193230 + ,199068 + ,195076 + ,191563 + ,191067 + ,186665 + ,185508 + ,184371 + ,183046 + ,175714 + ,175768 + ,171029 + ,170465 + ,170102 + ,156389 + ,124291 + ,99360 + ,86675 + ,85056 + ,128236 + ,164257 + ,162401 + ,152779 + ,156005 + ,153387 + ,153190 + ,148840 + ,144211 + ,145953 + ,145542 + ,150271 + ,147489 + ,143824 + ,134754 + ,131736 + ,126304 + ,125511 + ,125495 + ,130133 + ,126257 + ,110323 + ,98417 + ,105749 + ,120665 + ,124075 + ,127245 + ,146731 + ,144979 + ,148210 + ,144670 + ,142970 + ,142524 + ,146142 + ,146522 + ,148128 + ,148798 + ,150181 + ,152388 + ,155694 + ,160662 + ,155520 + ,158262 + ,154338 + ,158196 + ,160371 + ,154856 + ,150636 + ,145899 + ,141242 + ,140834 + ,141119 + ,139104 + ,134437 + ,129425 + ,123155 + ,119273 + ,120472 + ,121523 + ,121983 + ,123658 + ,124794 + ,124827 + ,120382 + ,117395 + ,115790 + ,114283 + ,117271 + ,117448 + ,118764 + ,120550 + ,123554 + ,125412 + ,124182 + ,119828 + ,115361 + ,114226 + ,115214 + ,115864 + ,114276 + ,113469 + ,114883 + ,114172 + ,111225 + ,112149 + ,115618 + ,118002 + ,121382 + ,120663) > par4 = 'Interval/Ratio' > par3 = 'TRUE' > par2 = 'grey' > par1 = '177' > xlab = 'x' > main = 'aantal geboortes' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > 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/wessaorg/rcomp/tmp/1e96q1299059351.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/www/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab + load(file="/var/www/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/www/wessaorg/rcomp/tmp/20pmr1299059351.tab") + } else { + mytab + reltab <- mytab / sum(mytab) + n <- length(mytab) + + #Note: the /var/www/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab + load(file="/var/www/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/www/wessaorg/rcomp/tmp/3sc681299059351.tab") + } > > try(system("convert tmp/1e96q1299059351.ps tmp/1e96q1299059351.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.620 0.060 0.694