R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(142.500,148.185,138.712,164.365,168.000,181.425,197.324,235.942,265.748,290.284,305.831,300.444,313.157,339.266,348.618,392.328,404.302,422.683,358.412) > par1 = '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > (n <- length(x)) [1] 19 > (np <- floor(n / par1)) [1] 1 > 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] 2 2 2 2 2 2 2 1 1 1 1 1 > arr [,1] [,2] [1,] 142.500 313.157 [2,] 148.185 339.266 [3,] 138.712 348.618 [4,] 164.365 392.328 [5,] 168.000 404.302 [6,] 181.425 422.683 [7,] 197.324 358.412 [8,] 235.942 NA [9,] 265.748 NA [10,] 290.284 NA [11,] 305.831 NA [12,] 300.444 NA > darr [,1] [,2] [1,] 5.685 26.109 [2,] -9.473 9.352 [3,] 25.653 43.710 [4,] 3.635 11.974 [5,] 13.425 18.381 [6,] 15.899 -64.271 [7,] 38.618 NA [8,] 29.806 NA [9,] 24.536 NA [10,] 15.547 NA [11,] -5.387 NA [12,] 12.713 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/www/html/rcomp/tmp/1mxyo1290617755.ps",horizontal=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/www/html/rcomp/tmp/2w6xr1290617755.ps",horizontal=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/www/html/rcomp/tmp/3w6xr1290617755.ps",horizontal=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/www/html/rcomp/tmp/4pxfu1290617755.ps",horizontal=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,] 142.5000 148.1850 138.712 164.3650 168.000 181.425 197.324 235.942 265.748 [2,] 142.5000 148.1850 138.712 164.3650 168.000 181.425 197.324 235.942 265.748 [3,] 227.8285 243.7255 243.665 278.3465 286.151 302.054 277.868 235.942 265.748 [4,] 313.1570 339.2660 348.618 392.3280 404.302 422.683 358.412 235.942 265.748 [5,] 313.1570 339.2660 348.618 392.3280 404.302 422.683 358.412 235.942 265.748 [,10] [,11] [,12] [1,] 290.284 305.831 300.444 [2,] 290.284 305.831 300.444 [3,] 290.284 305.831 300.444 [4,] 290.284 305.831 300.444 [5,] 290.284 305.831 300.444 $n [1] 2 2 2 2 2 2 2 1 1 1 1 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 37.1656 30.24432 9.15199 23.65969 22.14762 32.51363 97.89586 [2,] 418.4914 457.20668 478.17801 533.03331 550.15438 571.59437 457.84014 [,8] [,9] [,10] [,11] [,12] [1,] 235.942 265.748 290.284 305.831 300.444 [2,] 235.942 265.748 290.284 305.831 300.444 $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(142.5, 142.5, 227.8285, 313.157, 313.157, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5pxfu1290617755.ps",horizontal=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] [1,] 5.685 -9.4730 25.6530 3.6350 13.425 -64.271 38.618 29.806 24.536 15.547 [2,] 5.685 -9.4730 25.6530 3.6350 13.425 -64.271 38.618 29.806 24.536 15.547 [3,] 15.897 -0.0605 34.6815 7.8045 15.903 -24.186 38.618 29.806 24.536 15.547 [4,] 26.109 9.3520 43.7100 11.9740 18.381 15.899 38.618 29.806 24.536 15.547 [5,] 26.109 9.3520 43.7100 11.9740 18.381 15.899 38.618 29.806 24.536 15.547 [,11] [,12] [1,] -5.387 12.713 [2,] -5.387 12.713 [3,] -5.387 12.713 [4,] -5.387 12.713 [5,] -5.387 12.713 $n [1] 2 2 2 2 2 2 1 1 1 1 1 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] -6.921279 -21.09233 14.5077 -1.512070 10.36601 -113.75423 38.618 29.806 [2,] 38.715279 20.97133 54.8553 17.121070 21.43999 65.38223 38.618 29.806 [,9] [,10] [,11] [,12] [1,] 24.536 15.547 -5.387 12.713 [2,] 24.536 15.547 -5.387 12.713 $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(5.685, 5.685, 15.8970000000000, 26.1090000000000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6pxfu1290617755.ps",horizontal=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] [1,] 138.7120 313.157 [2,] 156.2750 343.942 [3,] 189.3745 358.412 [4,] 278.0160 398.315 [5,] 305.8310 422.683 $n [1] 12 7 $conf [,1] [,2] [1,] 133.8476 325.9413 [2,] 244.9014 390.8827 $out numeric(0) $group numeric(0) $names [1] "1" NA Warning message: In bxp(list(stats = c(138.712, 156.275, 189.3745, 278.016, 305.831, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7i7wx1290617755.ps",horizontal=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,] 227.8285 227.8285 227.8285 [2,] 243.6952 243.6952 243.6952 [3,] 278.1073 278.1073 278.1073 [4,] 295.3640 295.3640 295.3640 [5,] 305.8310 305.8310 305.8310 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 254.5408 254.5408 254.5408 [2,] 301.6737 301.6737 301.6737 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(227.8285, 243.69525, 278.10725, 295.364, 305.831, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1mxyo1290617755.ps tmp/1mxyo1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/2w6xr1290617755.ps tmp/2w6xr1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/3w6xr1290617755.ps tmp/3w6xr1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/4pxfu1290617755.ps tmp/4pxfu1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/5pxfu1290617755.ps tmp/5pxfu1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/6pxfu1290617755.ps tmp/6pxfu1290617755.png",intern=TRUE)) character(0) > try(system("convert tmp/7i7wx1290617755.ps tmp/7i7wx1290617755.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.186 0.939 2.976