R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(1684800.00 + ,1622400.00 + ,1716000.00 + ,1372800.00 + ,1778400.00 + ,1747200.00 + ,1872000.00 + ,1934400.00 + ,2152800.00 + ,1872000.00 + ,1778400.00 + ,2215200.00 + ,1872000.00 + ,1404000.00 + ,1653600.00 + ,1248000.00 + ,1747200.00 + ,1435200.00 + ,1903200.00 + ,1716000.00 + ,1809600.00 + ,2028000.00 + ,1996800.00 + ,2371200.00 + ,1716000.00 + ,1435200.00 + ,1591200.00 + ,1154400.00 + ,1653600.00 + ,1279200.00 + ,1809600.00 + ,1716000.00 + ,1528800.00 + ,2184000.00 + ,1965600.00 + ,2246400.00 + ,1684800.00 + ,1560000.00 + ,1404000.00 + ,1154400.00 + ,1528800.00 + ,1372800.00 + ,1872000.00 + ,1809600.00 + ,1560000.00 + ,2090400.00 + ,1934400.00 + ,2496000.00 + ,1996800.00 + ,1216800.00 + ,1216800.00 + ,1216800.00 + ,1435200.00 + ,1435200.00 + ,1934400.00 + ,1778400.00 + ,1591200.00 + ,1996800.00 + ,1840800.00 + ,2652000.00 + ,2090400.00 + ,1216800.00 + ,1279200.00 + ,1060800.00 + ,1466400.00 + ,1684800.00 + ,2121600.00 + ,2090400.00 + ,1684800.00 + ,1965600.00 + ,1747200.00 + ,2496000.00 + ,1903200.00 + ,1528800.00 + ,1372800.00 + ,1029600.00 + ,1528800.00 + ,1840800.00 + ,2152800.00 + ,2028000.00 + ,1497600.00 + ,2152800.00 + ,1684800.00 + ,2589600.00 + ,2152800.00 + ,1560000.00 + ,1435200.00 + ,967200.00 + ,1528800.00 + ,1466400.00 + ,2215200.00 + ,2215200.00 + ,1684800.00 + ,2184000.00 + ,1622400.00 + ,2527200.00 + ,2152800.00 + ,1591200.00 + ,1216800.00 + ,842400.00 + ,1653600.00 + ,1591200.00 + ,2090400.00 + ,2402400.00 + ,1778400.00 + ,1996800.00 + ,1497600.00 + ,2589600.00) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1684800 1872000 1716000 1684800 1996800 2090400 1903200 2152800 2152800 [2,] 1622400 1404000 1435200 1560000 1216800 1216800 1528800 1560000 1591200 [3,] 1716000 1653600 1591200 1404000 1216800 1279200 1372800 1435200 1216800 [4,] 1372800 1248000 1154400 1154400 1216800 1060800 1029600 967200 842400 [5,] 1778400 1747200 1653600 1528800 1435200 1466400 1528800 1528800 1653600 [6,] 1747200 1435200 1279200 1372800 1435200 1684800 1840800 1466400 1591200 [7,] 1872000 1903200 1809600 1872000 1934400 2121600 2152800 2215200 2090400 [8,] 1934400 1716000 1716000 1809600 1778400 2090400 2028000 2215200 2402400 [9,] 2152800 1809600 1528800 1560000 1591200 1684800 1497600 1684800 1778400 [10,] 1872000 2028000 2184000 2090400 1996800 1965600 2152800 2184000 1996800 [11,] 1778400 1996800 1965600 1934400 1840800 1747200 1684800 1622400 1497600 [12,] 2215200 2371200 2246400 2496000 2652000 2496000 2589600 2527200 2589600 [,10] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -62400 -468000 -280800 -124800 -780000 -873600 -374400 -592800 -561600 [2,] 93600 249600 156000 -156000 0 62400 -156000 -124800 -374400 [3,] -343200 -405600 -436800 -249600 0 -218400 -343200 -468000 -374400 [4,] 405600 499200 499200 374400 218400 405600 499200 561600 811200 [5,] -31200 -312000 -374400 -156000 0 218400 312000 -62400 -62400 [6,] 124800 468000 530400 499200 499200 436800 312000 748800 499200 [7,] 62400 -187200 -93600 -62400 -156000 -31200 -124800 0 312000 [8,] 218400 93600 -187200 -249600 -187200 -405600 -530400 -530400 -624000 [9,] -280800 218400 655200 530400 405600 280800 655200 499200 218400 [10,] -93600 -31200 -218400 -156000 -156000 -218400 -468000 -561600 -499200 [11,] 436800 374400 280800 561600 811200 748800 904800 904800 1092000 [12,] -343200 -655200 -561600 -499200 -561600 -592800 -436800 -374400 NA [,10] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] 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/wessaorg/rcomp/tmp/1lugx1438941466.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/wessaorg/rcomp/tmp/2oujw1438941466.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/wessaorg/rcomp/tmp/3uurb1438941466.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/wessaorg/rcomp/tmp/4ze2k1438941466.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,] 1684800 1216800 1216800 842400 1435200 1279200 1809600 1716000 1497600 [2,] 1716000 1404000 1279200 1029600 1528800 1435200 1872000 1778400 1560000 [3,] 1903200 1528800 1404000 1154400 1528800 1466400 1934400 1934400 1684800 [4,] 2090400 1560000 1591200 1216800 1653600 1684800 2121600 2090400 1778400 [5,] 2152800 1622400 1716000 1372800 1778400 1840800 2215200 2402400 1809600 [,10] [,11] [,12] [1,] 1872000 1497600 2215200 [2,] 1996800 1684800 2371200 [3,] 2028000 1778400 2496000 [4,] 2152800 1934400 2589600 [5,] 2184000 1996800 2652000 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1706016 1446640 1239680 1055808 1463072 1334944 1802944 1770080 1569776 [2,] 2100384 1610960 1568320 1252992 1594528 1597856 2065856 2098720 1799824 [,10] [,11] [,12] [1,] 1945840 1646944 2380976 [2,] 2110160 1909856 2611024 $out [1] 2152800 $group [1] 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1684800, 1716000, 1903200, 2090400, 2152800, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ndi61438941466.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] [1,] -873600 -374400 -468000 374400 -374400 436800 -187200 -624000 218400 [2,] -592800 -156000 -405600 405600 -156000 436800 -124800 -530400 218400 [3,] -468000 0 -343200 499200 -62400 499200 -62400 -249600 405600 [4,] -280800 93600 -249600 499200 0 499200 0 -187200 530400 [5,] -62400 249600 -218400 561600 218400 530400 62400 218400 655200 [,10] [,11] [,12] [1,] -561600 280800 -655200 [2,] -468000 436800 -577200 [3,] -218400 748800 -530400 [4,] -156000 904800 -405600 [5,] -31200 1092000 -343200 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -632320 -131456 -425360 449904 -144560 466336 -128128 -430352 241280 [2,] -303680 131456 -261040 548496 19760 532064 3328 -68848 569920 [,10] [,11] [,12] [1,] -382720 502320 -626258.2 [2,] -54080 995280 -434541.8 $out [1] 0 218400 811200 312000 124800 312000 748800 312000 -280800 $group [1] 3 4 4 5 6 6 6 7 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-873600, -592800, -468000, -280800, -62400, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6lsxk1438941466.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] [1,] 1622400 1248000 1154400 1154400 1216800 1060800 1029600 967200 842400 [2,] 1700400 1544400 1482000 1466400 1326000 1372800 1513200 1497600 1544400 [3,] 1778400 1778400 1684800 1622400 1684800 1716000 1762800 1653600 1716000 [4,] 1903200 1950000 1887600 1903200 1965600 2090400 2090400 2199600 2121600 [5,] 2152800 2371200 2246400 2496000 2652000 2496000 2589600 2527200 2589600 [,10] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1685902 1593403 1499803 1423173 1393074 1388698 1499535 1333413 1452735 [2,] 1870898 1963397 1869797 1821627 1976526 2043302 2026065 1973787 1979265 [,10] [1,] NA [2,] NA $out [1] 1372800 2215200 $group [1] 1 1 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(1622400, 1700400, 1778400, 1903200, 2152800, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7yd2b1438941466.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,] 1116267 1154400 1123200 [2,] 1499333 1497600 1521000 [3,] 1742000 1731600 1739400 [4,] 1981200 1934400 1965600 [5,] 2464800 2496000 2480400 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1522217 1532373 1536615 [2,] 1961783 1930827 1942185 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" > dev.off() null device 1 > > try(system("convert tmp/1lugx1438941466.ps tmp/1lugx1438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/2oujw1438941466.ps tmp/2oujw1438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/3uurb1438941466.ps tmp/3uurb1438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/4ze2k1438941466.ps tmp/4ze2k1438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/5ndi61438941466.ps tmp/5ndi61438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/6lsxk1438941466.ps tmp/6lsxk1438941466.png",intern=TRUE)) character(0) > try(system("convert tmp/7yd2b1438941466.ps tmp/7yd2b1438941466.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.439 0.469 2.941