R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-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(6.3,6.2,6.3,6.5,6.6,6.4,6.2,6.3,6.6,7.1,7.2,7.3,7.3,7.3,7.4,7.3,7.4,7.4,7.6,7.6,7.7,7.7,7.8,7.8,8,8.1,8.1,8.2,8.1,8.1,8.1,8.1,8.2,8.4,8.4,8.5,8.6,8.5,8.3,7.8,7.8,8,8.6,8.9,8.9,8.6,8.3,8.3,8.3,8.4,8.5,8.4,8.6,8.5,8.5,8.5,8.5,8.5,8.5,8.5,8.5,8.6,8.6,8.6,8.6,8.4,8.1,7.9,7.9,8,8,7.9,7.9,7.9,7.9,8,7.9,7.5,7.2,7,6.9,7.1,7.1,7.2,7.1,6.9,6.8,6.8,6.7,6.9,7.3,7.4,7.3,7.1,7,7.1,7.5,7.7,7.8,7.7,7.7,7.8,8,8.1,8.1,8,8.1,8.2,8.3,8.4,8.5,8.5,8.5,8.5,8.5,8.3,8.2,8.1,7.9,7.6) > 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] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 6.3 7.3 8.0 8.6 8.3 8.5 7.9 7.1 7.5 8.3 NA [2,] 6.2 7.3 8.1 8.5 8.4 8.6 7.9 6.9 7.7 8.4 NA [3,] 6.3 7.4 8.1 8.3 8.5 8.6 7.9 6.8 7.8 8.5 NA [4,] 6.5 7.3 8.2 7.8 8.4 8.6 8.0 6.8 7.7 8.5 NA [5,] 6.6 7.4 8.1 7.8 8.6 8.6 7.9 6.7 7.7 8.5 NA [6,] 6.4 7.4 8.1 8.0 8.5 8.4 7.5 6.9 7.8 8.5 NA [7,] 6.2 7.6 8.1 8.6 8.5 8.1 7.2 7.3 8.0 8.5 NA [8,] 6.3 7.6 8.1 8.9 8.5 7.9 7.0 7.4 8.1 8.3 NA [9,] 6.6 7.7 8.2 8.9 8.5 7.9 6.9 7.3 8.1 8.2 NA [10,] 7.1 7.7 8.4 8.6 8.5 8.0 7.1 7.1 8.0 8.1 NA [11,] 7.2 7.8 8.4 8.3 8.5 8.0 7.1 7.0 8.1 7.9 NA [12,] 7.3 7.8 8.5 8.3 8.5 7.9 7.2 7.1 8.2 7.6 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/wessaorg/rcomp/tmp/1lsoe1323175554.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/wessaorg/rcomp/tmp/2q9e11323175554.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/wessaorg/rcomp/tmp/3dxt01323175554.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/wessaorg/rcomp/tmp/4l6271323175554.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,] 6.30 6.2 6.3 6.5 6.60 6.4 6.20 6.3 6.6 7.1 7.00 7.10 [2,] 7.30 7.3 7.4 7.3 7.40 7.4 7.30 7.4 7.3 7.1 7.20 7.30 [3,] 7.95 8.0 8.0 7.9 7.85 7.9 8.05 8.0 8.0 8.0 7.95 7.85 [4,] 8.30 8.4 8.5 8.4 8.50 8.4 8.50 8.3 8.2 8.4 8.30 8.30 [5,] 8.60 8.6 8.6 8.6 8.60 8.5 8.60 8.9 8.9 8.6 8.50 8.50 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 7.45036 7.450396 7.450396 7.350396 7.300396 7.40036 7.450432 7.550324 [2,] 8.44964 8.549604 8.549604 8.449604 8.399604 8.39964 8.649568 8.449676 [,9] [,10] [,11] [,12] [1,] 7.550324 7.350468 7.400396 7.35036 [2,] 8.449676 8.649532 8.499604 8.34964 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(6.3, 7.3, 7.95, 8.3, 8.6, 6.2, 7.3, 8, 8.4, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5bxsb1323175554.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] [,7] [,8] [,9] [,10] [,11] [1,] 6.20 7.30 8.0 7.80 8.40 7.90 6.90 6.70 7.5 7.90 NA [2,] 6.30 7.35 8.1 8.15 8.45 7.95 7.10 6.85 7.7 8.15 NA [3,] 6.45 7.50 8.1 8.40 8.50 8.25 7.35 7.05 7.9 8.35 NA [4,] 6.85 7.70 8.3 8.60 8.50 8.60 7.90 7.20 8.1 8.50 NA [5,] 7.30 7.80 8.5 8.90 8.50 8.60 8.00 7.40 8.2 8.50 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 6.199141 7.340363 8.008779 8.194752 8.477195 7.953531 6.985115 6.890363 [2,] 6.700859 7.659637 8.191221 8.605248 8.522805 8.546469 7.714885 7.209637 [,9] [,10] [,11] [1,] 7.717557 8.190363 NA [2,] 8.082443 8.509637 NA $out [1] 8.3 8.6 7.6 $group [1] 5 5 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(6.2, 6.3, 6.45, 6.85, 7.3, 7.3, 7.35, 7.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6687b1323175554.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,] 0.5295701 1.40 0.8000 [2,] 0.6458120 1.75 0.9000 [3,] 0.7197579 2.20 0.9375 [4,] 0.7556164 2.35 0.9750 [5,] 0.7874008 2.60 1.0750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.6696753 1.926336 0.903292 [2,] 0.7698404 2.473664 0.971708 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(0.529570056219614, 0.645811984092527, 0.719757856314686, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1lsoe1323175554.ps tmp/1lsoe1323175554.png",intern=TRUE)) character(0) > try(system("convert tmp/2q9e11323175554.ps tmp/2q9e11323175554.png",intern=TRUE)) character(0) > try(system("convert tmp/3dxt01323175554.ps tmp/3dxt01323175554.png",intern=TRUE)) character(0) > try(system("convert tmp/4l6271323175554.ps tmp/4l6271323175554.png",intern=TRUE)) character(0) > try(system("convert tmp/5bxsb1323175554.ps tmp/5bxsb1323175554.png",intern=TRUE)) character(0) > try(system("convert tmp/6687b1323175554.ps tmp/6687b1323175554.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.299 0.280 1.595