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(567,557,547,527,729,719,567,466,476,476,486,507,446,385,335,335,527,547,395,223,314,314,385,426,416,314,365,345,517,476,314,193,304,335,365,405,324,254,284,294,557,557,405,385,446,416,497,598,618,476,436,395,669,689,638,689,679,598,689,790,831,709,628,689,952,1033,1013,1053,1043,942,1114,1155,1215,1033,962,1043,1236,1408,1367,1367,1387,1317,1499,1499,1468,1296,1327,1347,1479,1651,1529,1590,1539,1509,1742,1691,1620,1519,1620,1671,1732,1813,1732,1782,1721,1711,1964,1985,1904,1762,1883,1934,1995,2086,1995,2066,2035,1924,2157,2157) > par1 = '12' > 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,] 567 446 416 324 618 831 1215 1468 1620 1904 NA [2,] 557 385 314 254 476 709 1033 1296 1519 1762 NA [3,] 547 335 365 284 436 628 962 1327 1620 1883 NA [4,] 527 335 345 294 395 689 1043 1347 1671 1934 NA [5,] 729 527 517 557 669 952 1236 1479 1732 1995 NA [6,] 719 547 476 557 689 1033 1408 1651 1813 2086 NA [7,] 567 395 314 405 638 1013 1367 1529 1732 1995 NA [8,] 466 223 193 385 689 1053 1367 1590 1782 2066 NA [9,] 476 314 304 446 679 1043 1387 1539 1721 2035 NA [10,] 476 314 335 416 598 942 1317 1509 1711 1924 NA [11,] 486 385 365 497 689 1114 1499 1742 1964 2157 NA [12,] 507 426 405 598 790 1155 1499 1691 1985 2157 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/1rv2z1344183235.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/24go31344183235.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/3atni1344183235.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/47huw1344183235.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,] 324.0 254 284.0 294 517.0 476 314.0 193 304 314 365.0 405.0 [2,] 446.0 385 365.0 345 557.0 557 405.0 385 446 416 486.0 507.0 [3,] 724.5 633 587.5 608 840.5 876 825.5 871 861 770 901.5 972.5 [4,] 1468.0 1296 1327.0 1347 1479.0 1651 1529.0 1590 1539 1509 1742.0 1691.0 [5,] 1904.0 1762 1883.0 1934 1995.0 2086 1995.0 2066 2035 1924 2157.0 2157.0 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 213.8681 177.8281 106.8464 107.3608 379.832 329.394 263.9048 [2,] 1235.1319 1088.1719 1068.1536 1108.6392 1301.168 1422.606 1387.0952 [,8] [,9] [,10] [,11] [,12] [1,] 268.934 314.8936 223.8936 273.9523 380.9264 [2,] 1473.066 1407.1064 1316.1064 1529.0477 1564.0736 $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(324, 446, 724.5, 1468, 1904, 254, 385, 633, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5y7dl1344183235.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,] 466 223.0 193.0 254.0 395.0 628.0 962.0 1296.0 1519.0 1762 NA [2,] 481 324.5 314.0 309.0 537.0 770.0 1129.0 1407.5 1645.5 1914 NA [3,] 537 385.0 355.0 410.5 653.5 982.5 1342.0 1519.0 1726.5 1995 NA [4,] 567 436.0 410.5 527.0 689.0 1048.0 1397.5 1620.5 1797.5 2076 NA [5,] 567 547.0 517.0 598.0 790.0 1155.0 1499.0 1742.0 1985.0 2157 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 497.7748 334.1441 310.9857 311.0687 584.1718 855.7023 1219.535 1421.849 [2,] 576.2252 435.8559 399.0143 509.9313 722.8282 1109.2977 1464.465 1616.151 [,9] [,10] [,11] [1,] 1657.172 1921.111 NA [2,] 1795.828 2068.889 NA $out [1] 729 719 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(466, 481, 537, 567, 567, 223, 324.5, 385, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/628j51344183235.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,] 538.7486 1478.0 822.500 [2,] 573.9817 1589.5 883.250 [3,] 609.6616 1625.0 1015.125 [4,] 654.5757 1741.5 1080.375 [5,] 698.8277 1873.0 1192.500 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 572.9022 1555.672 925.215 [2,] 646.4211 1694.328 1105.035 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(538.748601441856, 573.98174571475, 609.661644194348, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1rv2z1344183235.ps tmp/1rv2z1344183235.png",intern=TRUE)) character(0) > try(system("convert tmp/24go31344183235.ps tmp/24go31344183235.png",intern=TRUE)) character(0) > try(system("convert tmp/3atni1344183235.ps tmp/3atni1344183235.png",intern=TRUE)) character(0) > try(system("convert tmp/47huw1344183235.ps tmp/47huw1344183235.png",intern=TRUE)) character(0) > try(system("convert tmp/5y7dl1344183235.ps tmp/5y7dl1344183235.png",intern=TRUE)) character(0) > try(system("convert tmp/628j51344183235.ps tmp/628j51344183235.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.743 0.393 2.133