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



myrfcuid = ''

x <- c(1.38,1.96,1.36,1.24,1.35,1.23,1.09,1.08,1.33,1.35,1.38,1.5,1.47,2.09,1.52,1.29,1.52,1.27,1.35,1.29,1.41,1.39,1.45,1.53,1.45,2.11,1.53,1.38,1.54,1.35,1.29,1.33,1.47,1.47,1.54,1.59,1.5,2,1.51,1.4,1.62,1.44,1.29,1.28,1.4,1.39,1.46,1.49,1.45,2.05,1.59,1.42,1.73,1.39,1.23,1.37,1.51,1.47,1.5,1.54,1.54,2.15,1.62,1.4,1.65,1.49,1.45,1.45,1.51,1.48,1.56,1.57)
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/191wd1507629903.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/2nd8m1507629903.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/3i8de1507629903.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/45jol1507629903.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/58z1v1507629903.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/6uo7e1507629903.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/7tyqs1507629903.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/191wd1507629903.ps /home/pw/wessanet/rcomp/tmp/191wd1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/2nd8m1507629903.ps /home/pw/wessanet/rcomp/tmp/2nd8m1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/3i8de1507629903.ps /home/pw/wessanet/rcomp/tmp/3i8de1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/45jol1507629903.ps /home/pw/wessanet/rcomp/tmp/45jol1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/58z1v1507629903.ps /home/pw/wessanet/rcomp/tmp/58z1v1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/6uo7e1507629903.ps /home/pw/wessanet/rcomp/tmp/6uo7e1507629903.png",intern=TRUE))
try(system("convert /home/pw/wessanet/rcomp/tmp/7tyqs1507629903.ps /home/pw/wessanet/rcomp/tmp/7tyqs1507629903.png",intern=TRUE))
