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(492865,480961,461935,456608,441977,439148,488180,520564,501492,485025,464196,460170,467037,460070,447988,442867,436087,431328,484015,509673,512927,502831,470984,471067,476049,474605,470439,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500857,506971,569323,579714,577992,565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141) > par1 = '12' > par1 <- as.numeric(par1) > (n <- length(x)) [1] 72 > (np <- floor(n / par1)) [1] 6 > 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] 6 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 492865 467037 476049 519164 562325 590865 NA [2,] 480961 460070 474605 517009 560854 589379 NA [3,] 461935 447988 470439 509933 555332 584428 NA [4,] 456608 442867 461251 509127 543599 573100 NA [5,] 441977 436087 454724 500857 536662 567456 NA [6,] 439148 431328 455626 506971 542722 569028 NA [7,] 488180 484015 516847 569323 593530 620735 NA [8,] 520564 509673 525192 579714 610763 628884 NA [9,] 501492 512927 522975 577992 612613 628232 NA [10,] 485025 502831 518585 565464 611324 612117 NA [11,] 464196 470984 509239 547344 594167 595404 NA [12,] 460170 471067 512238 554788 595454 597141 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/freestat/rcomp/tmp/1k7fu1257875274.ps",horizontal=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/freestat/rcomp/tmp/2nbum1257875274.ps",horizontal=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/freestat/rcomp/tmp/3j84t1257875274.ps",horizontal=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/freestat/rcomp/tmp/4fxlp1257875274.ps",horizontal=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] [1,] 467037.0 460070 447988 442867 436087.0 431328.0 484015 509673 501492.0 [2,] 476049.0 474605 461935 456608 441977.0 439148.0 488180 520564 512927.0 [3,] 506014.5 498985 490186 485189 477790.5 481298.5 543085 552453 550483.5 [4,] 562325.0 560854 555332 543599 536662.0 542722.0 593530 610763 612613.0 [5,] 590865.0 589379 584428 573100 567456.0 569028.0 620735 628884 628232.0 [,10] [,11] [,12] [1,] 485025.0 464196.0 460170 [2,] 502831.0 470984.0 471067 [3,] 542024.5 528291.5 533513 [4,] 611324.0 594167.0 595454 [5,] 612117.0 595404.0 597141 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 450363.7 443351.6 429941.9 429077 416715.6 414489.9 475130.8 494271.7 [2,] 561665.3 554618.4 550430.1 541301 538865.4 548107.1 611039.2 610634.3 [,9] [,10] [,11] [,12] [1,] 486182.8 472043 448834.5 453279.4 [2,] 614784.2 612006 607748.5 613746.6 $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(467037, 476049, 506014.5, 562325, 590865, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/58oc11257875274.ps",horizontal=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] [1,] 439148.0 431328.0 454724 500857.0 536662.0 567456.0 NA [2,] 458389.0 445427.5 465845 509530.0 549465.5 578764.0 NA [3,] 472578.5 469010.5 492644 533254.0 577927.5 593134.5 NA [4,] 490522.5 493423.0 517716 567393.5 603108.5 616426.0 NA [5,] 520564.0 512927.0 525192 579714.0 612613.0 628884.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 457922.2 447119.4 468985.3 506862.1 553460.6 575956.6 NA [2,] 487234.8 490901.6 516302.7 559645.9 602394.4 610312.4 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(439148, 458389, 472578.5, 490522.5, 520564, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6hzin1257875274.ps",horizontal=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,] 49526.23 119211.0 71281.75 [2,] 52327.75 126916.0 78566.75 [3,] 54698.67 130720.5 85532.88 [4,] 57393.97 136580.0 92610.50 [5,] 60086.19 137700.0 103927.75 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 52387.94 126312.7 79127.43 [2,] 57009.41 135128.3 91938.32 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(49526.2258542549, 52327.7544595579, 54698.6726148055, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1k7fu1257875274.ps tmp/1k7fu1257875274.png") > system("convert tmp/2nbum1257875274.ps tmp/2nbum1257875274.png") > system("convert tmp/3j84t1257875274.ps tmp/3j84t1257875274.png") > system("convert tmp/4fxlp1257875274.ps tmp/4fxlp1257875274.png") > system("convert tmp/58oc11257875274.ps tmp/58oc11257875274.png") > system("convert tmp/6hzin1257875274.ps tmp/6hzin1257875274.png") > > > proc.time() user system elapsed 1.646 1.278 1.921