R version 3.3.0 (2016-05-03) -- "Supposedly Educational" Copyright (C) 2016 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(110.27,110.91,110.27,109.41,111.47,110.77,110.83,110.52,110.44,109.99,110.55,109.99,111.2,111.81,110.36,111.24,112.6,111.75,112.49,111.94,113.22,112.85,114.37,113.68,118,118.27,119.2,117.98,117.59,117.41,118.31,118.4,117.92,118.94,118.81,117.44,120.21,119.74,118.79,118.19,119.16,118.88,119.59,119.44,119.84,119.31,118.15,118.23,119.89,118.83,118.95,119.86,119.07,119.52,119.92,119.68,119.81,120.09,119.98,118.96) > par1 = '12' > par1 <- as.numeric(par1) > x <- na.omit(x) > (n <- length(x)) [1] 60 > (np <- floor(n / par1)) [1] 5 > 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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 110.27 111.20 118.00 120.21 119.89 NA [2,] 110.91 111.81 118.27 119.74 118.83 NA [3,] 110.27 110.36 119.20 118.79 118.95 NA [4,] 109.41 111.24 117.98 118.19 119.86 NA [5,] 111.47 112.60 117.59 119.16 119.07 NA [6,] 110.77 111.75 117.41 118.88 119.52 NA [7,] 110.83 112.49 118.31 119.59 119.92 NA [8,] 110.52 111.94 118.40 119.44 119.68 NA [9,] 110.44 113.22 117.92 119.84 119.81 NA [10,] 109.99 112.85 118.94 119.31 120.09 NA [11,] 110.55 114.37 118.81 118.15 119.98 NA [12,] 109.99 113.68 117.44 118.23 118.96 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.64 0.61 0.27 -0.47 -1.06 NA [2,] -0.64 -1.45 0.93 -0.95 0.12 NA [3,] -0.86 0.88 -1.22 -0.60 0.91 NA [4,] 2.06 1.36 -0.39 0.97 -0.79 NA [5,] -0.70 -0.85 -0.18 -0.28 0.45 NA [6,] 0.06 0.74 0.90 0.71 0.40 NA [7,] -0.31 -0.55 0.09 -0.15 -0.24 NA [8,] -0.08 1.28 -0.48 0.40 0.13 NA [9,] -0.45 -0.37 1.02 -0.53 0.28 NA [10,] 0.56 1.52 -0.13 -1.16 -0.11 NA [11,] -0.56 -0.69 -1.37 0.08 -1.02 NA [12,] 1.21 4.32 2.77 1.66 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/wessaorg/rcomp/tmp/1npvb1464462528.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/27ilk1464462528.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/3z3nm1464462528.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/4bjk71464462528.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] [1,] 110.27 110.91 110.27 109.41 111.47 110.77 110.83 110.52 110.44 109.99 [2,] 111.20 111.81 110.36 111.24 112.60 111.75 112.49 111.94 113.22 112.85 [3,] 118.00 118.27 118.79 117.98 117.59 117.41 118.31 118.40 117.92 118.94 [4,] 119.89 118.83 118.95 118.19 119.07 118.88 119.59 119.44 119.81 119.31 [5,] 120.21 119.74 119.20 119.86 119.16 119.52 119.92 119.68 119.84 120.09 [,11] [,12] [1,] 110.55 109.99 [2,] 114.37 113.68 [3,] 118.15 117.44 [4,] 118.81 118.23 [5,] 119.98 118.96 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 111.8597 113.3097 112.7203 113.0691 113.0183 112.372 113.2932 113.1005 [2,] 124.1403 123.2303 124.8597 122.8909 122.1617 122.448 123.3268 123.6995 [,9] [,10] [,11] [,12] [1,] 113.2635 114.3754 115.0127 114.225 [2,] 122.5765 123.5046 121.2873 120.655 $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(110.27, 111.2, 118, 119.89, 120.21, 110.91, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5cbxx1464462528.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] [,12] [1,] -1.06 -1.45 -1.22 -0.79 -0.85 0.06 -0.55 -0.48 -0.53 -1.16 -1.37 1.210 [2,] -0.47 -0.95 -0.86 -0.39 -0.70 0.40 -0.31 -0.08 -0.45 -0.13 -1.02 1.435 [3,] 0.27 -0.64 -0.60 0.97 -0.28 0.71 -0.24 0.13 -0.37 -0.11 -0.69 2.215 [4,] 0.61 0.12 0.88 1.36 -0.18 0.74 -0.15 0.40 0.28 0.56 -0.56 3.545 [5,] 0.64 0.93 0.91 2.06 0.45 0.90 -0.15 0.40 1.02 1.52 0.08 4.320 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4931253 -1.3960593 -1.8294796 -0.2665456 -0.64743069 0.4697569 [2,] 1.0331253 0.1160593 0.6294796 2.2065456 0.08743069 0.9502431 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -0.3530556 -0.2091668 -0.8858162 -0.5975523 -1.0150348 0.5481 [2,] -0.1269444 0.4691668 0.1458162 0.3775523 -0.3649652 3.8819 $out [1] 0.09 1.28 $group [1] 7 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-1.06, -0.469999999999999, 0.269999999999996, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/66ym11464462528.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] [1,] 109.41 110.360 117.410 118.150 118.830 NA [2,] 110.13 111.495 117.755 118.510 119.015 NA [3,] 110.48 112.215 118.135 119.235 119.745 NA [4,] 110.80 113.035 118.605 119.665 119.905 NA [5,] 111.47 114.370 119.200 120.210 120.090 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 110.1744 111.5126 117.7473 118.7082 119.3391 NA [2,] 110.7856 112.9174 118.5227 119.7618 120.1509 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(109.41, 110.13, 110.48, 110.8, 111.47, 110.36, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7kup31464462528.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,] 115.336 117.410 114.6550 [2,] 115.663 117.755 115.3175 [3,] 115.946 118.075 115.7625 [4,] 116.232 118.355 116.0600 [5,] 116.372 118.940 116.5900 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 115.6865 117.8013 115.4238 [2,] 116.2055 118.3487 116.1012 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(115.336, 115.663, 115.946, 116.232, 116.372, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1npvb1464462528.ps tmp/1npvb1464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/27ilk1464462528.ps tmp/27ilk1464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/3z3nm1464462528.ps tmp/3z3nm1464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/4bjk71464462528.ps tmp/4bjk71464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/5cbxx1464462528.ps tmp/5cbxx1464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/66ym11464462528.ps tmp/66ym11464462528.png",intern=TRUE)) character(0) > try(system("convert tmp/7kup31464462528.ps tmp/7kup31464462528.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.359 0.446 2.827