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(12,13,23,24,21,20,18,13,12,25,21,17,10,15,23,12,10,21,9,13,17,14,20,12,13,14,23,14,21,21,21,7,15,28,28,18,22,30,1,26,29,24,26,19,19,41,36,54,49,33,50,43,51,46,45,23,56,41,48,43) > par1 = '12' > #'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) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + if (j == par1) j = 0 + } > ari [1] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 12 10 13 22 49 NA [2,] 13 15 14 30 33 NA [3,] 23 23 23 1 50 NA [4,] 24 12 14 26 43 NA [5,] 21 10 21 29 51 NA [6,] 20 21 21 24 46 NA [7,] 18 9 21 26 45 NA [8,] 13 13 7 19 23 NA [9,] 12 17 15 19 56 NA [10,] 25 14 28 41 41 NA [11,] 21 20 28 36 48 NA [12,] 17 12 18 54 43 NA > arr.sd <- array(NA,dim=par1) > arr.range <- array(NA,dim=par1) > arr.iqr <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.sd[j] <- sqrt(var(arr[j,],na.rm=TRUE)) + arr.range[j] <- max(arr[j,],na.rm=TRUE) - min(arr[j,],na.rm=TRUE) + arr.iqr[j] <- quantile(arr[j,],0.75,na.rm=TRUE) - quantile(arr[j,],0.25,na.rm=TRUE) + } > overall.sd <- sqrt(var(x)) > overall.range <- max(x) - min(x) > overall.iqr <- quantile(x,0.75) - quantile(x,0.25) > postscript(file="/var/www/html/rcomp/tmp/1p3by1291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.sd,type='b',ylab='S.D.',main='Standard Deviation Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.sd,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2p3by1291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.range,type='b',ylab='range',main='Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.range,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3p3by1291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.iqr,type='b',ylab='IQR',main='Interquartile Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.iqr,0) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/40ua01291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 10 13 23 12 10 20 9 7 12 14 20 12 [2,] 12 14 23 14 21 21 18 13 15 25 21 17 [3,] 13 15 23 24 21 21 21 13 17 28 28 18 [4,] 22 30 23 26 29 24 26 19 19 41 36 43 [5,] 22 33 23 43 29 24 26 23 19 41 48 54 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 5.934025 3.69444 23 15.52083 15.34722 18.88021 15.34722 8.760415 [2,] 20.065975 26.30556 23 32.47917 26.65278 23.11979 26.65278 17.239585 [,9] [,10] [,11] [,12] [1,] 14.17361 16.69444 17.40104 -0.3715345 [2,] 19.82639 39.30556 38.59896 36.3715345 $out [1] 49 1 50 51 46 45 56 $group [1] 1 3 3 5 6 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(10, 12, 13, 22, 22, 13, 14, 15, 30, 33, 23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/50ua01291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] 12 9.0 7.0 19.0 33.0 NA [2,] 13 11.0 14.0 20.5 42.0 NA [3,] 19 13.5 19.5 26.0 45.5 NA [4,] 22 18.5 22.0 33.0 49.5 NA [5,] 25 23.0 28.0 41.0 56.0 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 14.89504 10.0792 15.85115 20.29867 42.0792 NA [2,] 23.10496 16.9208 23.14885 31.70133 48.9208 NA $out [1] 1 54 23 $group [1] 4 4 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(12, 13, 19, 22, 25, 9, 11, 13.5, 18.5, 23, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6b39l1291405752.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.sd,arr.range,arr.iqr)) > names(z) <- list('S.D.','Range','IQR') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Variability',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 6.164414 16.0 0.0 [2,] 11.267498 26.5 5.0 [3,] 12.852404 33.5 9.0 [4,] 16.793085 41.5 15.5 [5,] 18.539148 49.0 26.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 10.33215 26.6584 4.210880 [2,] 15.37266 40.3416 13.789120 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(6.16441400296898, 11.2674975415576, 12.8524041714969, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1p3by1291405752.ps tmp/1p3by1291405752.png",intern=TRUE)) character(0) > try(system("convert tmp/2p3by1291405752.ps tmp/2p3by1291405752.png",intern=TRUE)) character(0) > try(system("convert tmp/3p3by1291405752.ps tmp/3p3by1291405752.png",intern=TRUE)) character(0) > try(system("convert tmp/40ua01291405752.ps tmp/40ua01291405752.png",intern=TRUE)) character(0) > try(system("convert tmp/50ua01291405752.ps tmp/50ua01291405752.png",intern=TRUE)) character(0) > try(system("convert tmp/6b39l1291405752.ps tmp/6b39l1291405752.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.035 0.784 2.380