R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(434.49,434.43,434.07,434.52,433.52,433.52,433.52,433.26,433.63,434.67,432.87,432.49,432.5,430.88,431.64,433.7,434.47,434.38,434.9,435.3,435.37,436.61,436.08,436.08,436.08,435.99,437.72,438.73,437.7,438.13,438.13,438.31,439.67,442,442.61,442.27,442.27,443.72,443.83,444.01,445.01,444.9,444.86,445.36,447.99,449.08,448.66,447.65,447.69,448.17,450.62,450.38,449.18,448.73,448.73,449.55,449.71,449.93,452.23,452.98,452.88,452.37,452.76,452.96,455.21,453.6,453.6,453.86,454.21,454.62,456.28,456.17) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 72 > (np <- floor(n / par1)) [1] 6 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[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,] 434.49 432.50 436.08 442.27 447.69 452.88 NA [2,] 434.43 430.88 435.99 443.72 448.17 452.37 NA [3,] 434.07 431.64 437.72 443.83 450.62 452.76 NA [4,] 434.52 433.70 438.73 444.01 450.38 452.96 NA [5,] 433.52 434.47 437.70 445.01 449.18 455.21 NA [6,] 433.52 434.38 438.13 444.90 448.73 453.60 NA [7,] 433.52 434.90 438.13 444.86 448.73 453.60 NA [8,] 433.26 435.30 438.31 445.36 449.55 453.86 NA [9,] 433.63 435.37 439.67 447.99 449.71 454.21 NA [10,] 434.67 436.61 442.00 449.08 449.93 454.62 NA [11,] 432.87 436.08 442.61 448.66 452.23 456.28 NA [12,] 432.49 436.08 442.27 447.65 452.98 456.17 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.06 -1.62 -0.09 1.45 0.48 -0.51 NA [2,] -0.36 0.76 1.73 0.11 2.45 0.39 NA [3,] 0.45 2.06 1.01 0.18 -0.24 0.20 NA [4,] -1.00 0.77 -1.03 1.00 -1.20 2.25 NA [5,] 0.00 -0.09 0.43 -0.11 -0.45 -1.61 NA [6,] 0.00 0.52 0.00 -0.04 0.00 0.00 NA [7,] -0.26 0.40 0.18 0.50 0.82 0.26 NA [8,] 0.37 0.07 1.36 2.63 0.16 0.35 NA [9,] 1.04 1.24 2.33 1.09 0.22 0.41 NA [10,] -1.80 -0.53 0.61 -0.42 2.30 1.66 NA [11,] -0.38 0.00 -0.34 -1.01 0.75 -0.11 NA [12,] 0.01 0.00 0.00 0.04 -0.10 NA NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/fisher/rcomp/tmp/1cnet1350287453.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/2073d1350287453.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/360hk1350287453.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/4c4s61350287453.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] [1,] 432.500 430.880 431.640 433.70 433.520 433.520 433.520 433.260 433.63 [2,] 434.490 434.430 434.070 434.52 434.470 434.380 434.900 435.300 435.37 [3,] 439.175 439.855 440.775 441.37 441.355 441.515 441.495 441.835 443.83 [4,] 447.690 448.170 450.620 450.38 449.180 448.730 448.730 449.550 449.71 [5,] 452.880 452.370 452.760 452.96 455.210 453.600 453.600 453.860 454.21 [,10] [,11] [,12] [1,] 434.67 432.870 432.49 [2,] 436.61 436.080 436.08 [3,] 445.54 445.635 444.96 [4,] 449.93 452.230 452.98 [5,] 454.62 456.280 456.17 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 430.6606 430.9923 430.0997 431.1398 431.8666 432.2588 432.5742 432.6433 [2,] 447.6894 448.7177 451.4503 451.6002 450.8434 450.7712 450.4158 451.0267 [,9] [,10] [,11] [,12] [1,] 434.5802 436.9482 435.2177 434.059 [2,] 453.0798 454.1318 456.0523 455.861 $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(432.5, 434.49, 439.175, 447.69, 452.88, 430.88, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/58a6p1350287453.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -1.620 -0.360 -0.240 -1.200 -0.45 0 -0.26 0.07 0.220 -1.800 -0.380 [2,] -0.510 0.110 0.180 -1.030 -0.45 0 0.18 0.16 0.410 -0.530 -0.380 [3,] -0.075 0.575 0.325 -0.115 -0.10 0 0.33 0.36 1.065 0.095 -0.225 [4,] 0.480 1.730 1.010 1.000 0.00 0 0.50 1.36 1.240 1.660 0.000 [5,] 1.450 2.450 2.060 2.250 0.43 0 0.82 2.63 2.330 2.300 0.000 [,12] [1,] 0.00 [2,] 0.00 [3,] 0.00 [4,] 0.01 [5,] 0.01 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.713582 -0.4699523 -0.2103768 -1.424416 -0.3902645 0 0.1235897 [2,] 0.563582 1.6199523 0.8603768 1.194416 0.1902645 0 0.5364103 [,8] [,9] [,10] [,11] [,12] [1,] -0.4140388 0.5296232 -1.317621 -0.47011227 -0.007065975 [2,] 1.1340388 1.6003768 1.507621 0.02011227 0.007065975 $out [1] -1.61 0.52 -0.04 -1.01 0.75 0.04 -0.10 $group [1] 5 6 6 11 11 12 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.62, -0.509999999999991, -0.0749999999999886, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/6nab01350287453.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] [1,] 432.490 430.880 435.990 442.270 447.69 452.370 NA [2,] 433.390 433.100 437.710 443.920 448.73 452.920 NA [3,] 433.575 434.685 438.220 444.955 449.63 453.730 NA [4,] 434.460 435.725 440.835 447.820 450.50 454.915 NA [5,] 434.670 436.610 442.610 449.080 452.98 456.280 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 433.087 433.4877 436.7947 443.1762 448.8227 452.8201 NA [2,] 434.063 435.8823 439.6453 446.7338 450.4373 454.6399 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(432.49, 433.39, 433.575, 434.46, 434.67, 430.88, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7knvu1350287453.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 440.9267 439.175 440.6112 [2,] 441.9917 441.065 441.6263 [3,] 442.4492 441.505 442.0662 [4,] 443.9575 444.395 443.3500 [5,] 444.7883 445.635 444.6375 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 441.5525 439.9862 441.2800 [2,] 443.3458 443.0238 442.8525 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(440.926666666667, 441.991666666667, 442.449166666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1cnet1350287453.ps tmp/1cnet1350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/2073d1350287453.ps tmp/2073d1350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/360hk1350287453.ps tmp/360hk1350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/4c4s61350287453.ps tmp/4c4s61350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/58a6p1350287453.ps tmp/58a6p1350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/6nab01350287453.ps tmp/6nab01350287453.png",intern=TRUE)) character(0) > try(system("convert tmp/7knvu1350287453.ps tmp/7knvu1350287453.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.617 0.642 4.248