x <- c(133448.00
,132951.00
,132447.00
,131404.00
,141722.00
,141176.00
,133448.00
,128310.00
,128807.00
,128807.00
,129360.00
,130354.00
,131901.00
,131901.00
,130907.00
,128310.00
,141722.00
,143766.00
,140679.00
,133448.00
,136542.00
,131901.00
,133994.00
,134995.00
,136038.00
,133448.00
,133994.00
,130354.00
,141722.00
,145313.00
,142226.00
,136542.00
,142723.00
,136038.00
,142226.00
,141722.00
,143269.00
,137585.00
,143766.00
,143269.00
,152544.00
,150451.00
,142226.00
,138082.00
,143766.00
,136038.00
,141722.00
,142723.00
,144816.00
,140182.00
,142723.00
,144270.00
,149954.00
,145313.00
,139132.00
,132447.00
,138635.00
,121625.00
,129857.00
,134491.00
,139132.00
,132447.00
,132447.00
,132447.00
,136038.00
,130907.00
,124173.00
,118538.00
,122626.00
,106666.00
,116445.00
,122129.00
,123172.00
,117488.00
,117985.00
,116445.00
,121625.00
,117985.00
,110810.00
,105623.00
,114394.00
,95347.00
,107716.00
,113351.00
,113351.00
,106666.00
,100485.00
,99988.00
,105623.00
,100485.00
,90713.00
,83979.00
,91210.00
,74207.00
,89663.00
,97888.00
,100485.00
,94801.00
,87619.00
,92757.00
,94801.00
,93254.00
,77791.00
,70616.00
,75747.00
,60291.00
,76251.00
,81935.00
,86569.00
,78841.00
,71610.00
,75747.00
,77791.00
,73703.00
,58247.00
,51513.00
,57694.00
,40691.00
,59241.00
,70616.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))
(np <- floor(n / par1))
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
arr
darr
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/1ljv91439653003.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()
postscript(file="/var/wessaorg/rcomp/tmp/2y7ep1439653003.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()
postscript(file="/var/wessaorg/rcomp/tmp/3h13s1439653003.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()
postscript(file="/var/wessaorg/rcomp/tmp/4faoy1439653003.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'))
dev.off()
postscript(file="/var/wessaorg/rcomp/tmp/58nau1439653003.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'))
dev.off()
postscript(file="/var/wessaorg/rcomp/tmp/6eq4q1439653003.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'))
dev.off()
postscript(file="/var/wessaorg/rcomp/tmp/7aaco1439653003.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'))
dev.off()

try(system("convert tmp/1ljv91439653003.ps tmp/1ljv91439653003.png",intern=TRUE))
try(system("convert tmp/2y7ep1439653003.ps tmp/2y7ep1439653003.png",intern=TRUE))
try(system("convert tmp/3h13s1439653003.ps tmp/3h13s1439653003.png",intern=TRUE))
try(system("convert tmp/4faoy1439653003.ps tmp/4faoy1439653003.png",intern=TRUE))
try(system("convert tmp/58nau1439653003.ps tmp/58nau1439653003.png",intern=TRUE))
try(system("convert tmp/6eq4q1439653003.ps tmp/6eq4q1439653003.png",intern=TRUE))
try(system("convert tmp/7aaco1439653003.ps tmp/7aaco1439653003.png",intern=TRUE))

