source('/home/pw/wessanet/cretab')



myrfcuid = 'r0625752'

x <- c(46.8,52.8,58.3,54.5,64.7,58.3,57.5,56.7,56,66.2,58.2,53.9,53.1,54.4,59.2,57.8,61.5,60.1,60.1,58.4,56.8,63.8,53.9,63.1,55.7,54.9,64.6,60.2,63.9,69.9,58.5,52,66.7,72,68.4,70.8,56.5,62.6,66.5,69.2,63.7,73.6,64.1,53.8,72.2,80.2,69.1,72,66.3,72.5,88.9,88.6,73.7,86,70,71.6,90.5,85.7,84.8,81.1,70.8,65.7,86.2,76.1,79.8,85.2,75.8,69.4,85,75,77.7,68.5,68.4,65,73.2,67.9,76.5,85.5,71.7,57.9,75.5,78.2,75.7,67.1,74.6,66.2,74.9,69.5,76.1,82.3,82.1,60.5,71.2,81.4,74.5,61.4,83.8,85.4,91.6,91.9,86.3,96.8,81,70.8,98.8,94.5,84.5,92.8,81.2,75.7,86.7,87.5,87.8,103.1,96.4,77.1,106.5,95.7,95.3,86.6,89.6,81.9,98.4,92.9,83.9,121.8,103.9,87.5,118.9,109,112.2,100.1,111.3,102.7,122.6,124.8,120.3,118.3,108.7,100.7,124,103.1,115,112.7,101.7,111.5,114.4,112.5,107.2,136.7,107.8,94.6,110.7,126.6,127.9,109.2,87.1,90.8,94.5,103.3,103.2,105.4,103.9,79.8,105.6,113,87.7,110,90.3,108.9,105.1,113,100.4,110.1,114.7,88.6,117.2,127.7,107.8,102.8,100.2,108.4,114.2,94.4,92.2,115.3,102,86.3,112,112.5,109.5,105.9,115.3,126.2,112.2,112.5,106.9,90.6,75.6,78.8,101.8,93.9,100,89.2,97.7,121.1,108.8,92.9,113.6,112.6,98.8,78)
par1 = '12'
par1 <- '12'
#'GNU S' R Code compiled by R2WASP v. 1.2.327 (Sun, 09 Jul 2017 18:21:32 +0200)
#Author: root
#To cite this work: Wessa P., (2017), Mean Plot (v1.0.6) 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)
x <- na.omit(x)
(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="/home/pw/wessanet/rcomp/tmp/1agxd1513438256.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="/home/pw/wessanet/rcomp/tmp/2rj6b1513438256.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="/home/pw/wessanet/rcomp/tmp/38qt61513438256.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="/home/pw/wessanet/rcomp/tmp/436uz1513438256.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="/home/pw/wessanet/rcomp/tmp/54o471513438256.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="/home/pw/wessanet/rcomp/tmp/6avxj1513438256.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="/home/pw/wessanet/rcomp/tmp/7zvmz1513438256.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 /home/pw/wessanet/rcomp/tmp/1agxd1513438256.ps /home/pw/wessanet/rcomp/tmp/1agxd1513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/2rj6b1513438256.ps /home/pw/wessanet/rcomp/tmp/2rj6b1513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/38qt61513438256.ps /home/pw/wessanet/rcomp/tmp/38qt61513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/436uz1513438256.ps /home/pw/wessanet/rcomp/tmp/436uz1513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/54o471513438256.ps /home/pw/wessanet/rcomp/tmp/54o471513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/6avxj1513438256.ps /home/pw/wessanet/rcomp/tmp/6avxj1513438256.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/7zvmz1513438256.ps /home/pw/wessanet/rcomp/tmp/7zvmz1513438256.png",intern=TRUE))
