R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 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(2443.6,2460.2,2448.2,2470.4,2484.7,2466.8,2487.9,2508.4,2510.5,2497.4,2532.5,2556.8,2561,2547.3,2541.5,2558.5,2587.9,2580.5,2579.6,2589.3,2595,2595.6,2588.8,2591.7,2601.7,2585.4,2573.3,2597.4,2600.6,2570.6,2569.4,2584.9,2608.8,2617.2,2621,2540.5,2554.5,2601.9,2623,2640.7,2640.7,2619.8,2624.2,2638.2,2645.7,2679.6,2669,2664.6,2663.3,2667.4,2653.2,2630.8,2626.6,2641.9,2625.8,2606,2594.4,2583.6,2588.7,2600.3,2579.5,2576.6,2597.8,2595.6,2599,2621.7,2645.6,2644.2,2625.6,2624.6,2596.2,2599.5,2584.1,2570.8,2555,2574.5,2576.7,2579,2588.7,2601.1,2575.7,2559.5,2561.1,2528.3,2514.7,2558.5,2553.3,2577.1,2566,2549.5,2527.8,2540.9,2534.2,2538,2559,2554.9,2575.5,2546.5,2561.6,2546.6,2502.9,2463.1,2472.6,2463.5,2446.3,2456.2,2471.5,2447.5,2428.6,2420.2,2414.9,2420.2,2423.8,2407,2388.7,2409.6,2392,2380.2,2423.3,2451.6,2440.8,2432.9,2413.6,2391.6,2358.1,2345.4,2384.4,2384.4,2384.4,2418.7,2420,2493.1,2493.1,2492.8) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Standard Deviation Plot (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_sdplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 134 > (np <- floor(n / par1)) [1] 11 > arr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + if (j == par1) j = 0 + } > ari [1] 12 12 11 11 11 11 11 11 11 11 11 11 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 2443.6 2561.0 2601.7 2554.5 2663.3 2579.5 2584.1 2514.7 2575.5 2428.6 [2,] 2460.2 2547.3 2585.4 2601.9 2667.4 2576.6 2570.8 2558.5 2546.5 2420.2 [3,] 2448.2 2541.5 2573.3 2623.0 2653.2 2597.8 2555.0 2553.3 2561.6 2414.9 [4,] 2470.4 2558.5 2597.4 2640.7 2630.8 2595.6 2574.5 2577.1 2546.6 2420.2 [5,] 2484.7 2587.9 2600.6 2640.7 2626.6 2599.0 2576.7 2566.0 2502.9 2423.8 [6,] 2466.8 2580.5 2570.6 2619.8 2641.9 2621.7 2579.0 2549.5 2463.1 2407.0 [7,] 2487.9 2579.6 2569.4 2624.2 2625.8 2645.6 2588.7 2527.8 2472.6 2388.7 [8,] 2508.4 2589.3 2584.9 2638.2 2606.0 2644.2 2601.1 2540.9 2463.5 2409.6 [9,] 2510.5 2595.0 2608.8 2645.7 2594.4 2625.6 2575.7 2534.2 2446.3 2392.0 [10,] 2497.4 2595.6 2617.2 2679.6 2583.6 2624.6 2559.5 2538.0 2456.2 2380.2 [11,] 2532.5 2588.8 2621.0 2669.0 2588.7 2596.2 2561.1 2559.0 2471.5 2423.3 [12,] 2556.8 2591.7 2540.5 2664.6 2600.3 2599.5 2528.3 2554.9 2447.5 2451.6 [,11] [,12] [1,] 2440.8 2493.1 [2,] 2432.9 2492.8 [3,] 2413.6 NA [4,] 2391.6 NA [5,] 2358.1 NA [6,] 2345.4 NA [7,] 2384.4 NA [8,] 2384.4 NA [9,] 2384.4 NA [10,] 2418.7 NA [11,] 2420.0 NA [12,] 2493.1 NA > arr.sd <- array(NA,dim=par1) > arr.range <- array(NA,dim=par1) > arr.iqr <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.sd[j] <- sqrt(var(arr[j,],na.rm=TRUE)) + arr.range[j] <- max(arr[j,],na.rm=TRUE) - min(arr[j,],na.rm=TRUE) + arr.iqr[j] <- quantile(arr[j,],0.75,na.rm=TRUE) - quantile(arr[j,],0.25,na.rm=TRUE) + } > overall.sd <- sqrt(var(x)) > overall.range <- max(x) - min(x) > overall.iqr <- quantile(x,0.75) - quantile(x,0.25) > postscript(file="/var/wessaorg/rcomp/tmp/1jhdn1438968037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.sd,type='b',ylab='S.D.',main='Standard Deviation Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.sd,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2cpae1438968037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.range,type='b',ylab='range',main='Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.range,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3rxas1438968037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.iqr,type='b',ylab='IQR',main='Interquartile Range Plot',xlab='Periodic Index') > mtext(paste('# blocks = ',np)) > abline(overall.iqr,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/49pf41438968037.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,] 2428.60 2420.2 2413.60 2391.6 2358.1 2345.40 2384.40 2384.40 2384.4 2380.2 [2,] 2468.35 2476.5 2494.85 2508.5 2493.8 2464.95 2480.25 2485.95 2478.4 2476.8 [3,] 2557.75 2552.9 2555.00 2574.5 2576.7 2570.60 2569.40 2584.90 2575.7 2559.5 [4,] 2581.80 2581.0 2585.55 2596.5 2599.8 2600.15 2606.45 2603.55 2601.9 2606.4 [5,] 2663.30 2667.4 2653.20 2640.7 2640.7 2641.90 2645.60 2644.20 2645.7 2679.6 [,11] [,12] [1,] 2420.0 2447.5 [2,] 2502.0 2510.7 [3,] 2561.1 2554.9 [4,] 2592.5 2595.6 [5,] 2669.0 2664.6 $n [1] 12 12 11 11 11 11 11 11 11 11 11 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2506.005 2505.237 2511.792 2532.578 2526.203 2506.192 2509.28 2528.877 [2,] 2609.495 2600.563 2598.208 2616.422 2627.197 2635.008 2629.52 2640.923 [,9] [,10] [,11] [,12] [1,] 2516.866 2497.76 2517.987 2514.455 [2,] 2634.534 2621.24 2604.213 2595.345 $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(2428.6, 2468.35, 2557.75, 2581.8, 2663.3, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/53sh31438968037.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] [,7] [,8] [,9] [1,] 2443.60 2541.50 2540.50 2601.90 2583.60 2576.60 2555.00 2514.70 2446.30 [2,] 2463.50 2559.75 2571.95 2621.40 2597.35 2595.90 2560.30 2536.10 2459.65 [3,] 2486.30 2584.20 2591.40 2639.45 2626.20 2599.25 2575.10 2551.40 2472.05 [4,] 2509.45 2590.50 2605.25 2655.15 2647.55 2625.10 2581.55 2558.75 2546.55 [5,] 2556.80 2595.60 2621.00 2679.60 2667.40 2645.60 2601.10 2577.10 2575.50 [,10] [,11] [,12] [1,] 2380.20 2345.40 2492.80 [2,] 2399.50 2384.40 2492.80 [3,] 2417.55 2402.60 2492.95 [4,] 2423.55 2426.45 2493.10 [5,] 2451.60 2440.80 2493.10 $n [1] 12 12 12 12 12 12 12 12 12 12 12 2 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2465.342 2570.175 2576.212 2624.056 2603.303 2585.932 2565.408 2541.069 [2,] 2507.258 2598.225 2606.588 2654.844 2649.097 2612.568 2584.792 2561.731 [,9] [,10] [,11] [,12] [1,] 2432.414 2406.581 2383.421 2492.615 [2,] 2511.686 2428.519 2421.779 2493.285 $out [1] 2554.5 2528.3 2493.1 $group [1] 4 7 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" NA Warning message: In bxp(list(stats = c(2443.6, 2463.5, 2486.3, 2509.45, 2556.8, 2541.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6gobt1438968037.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.sd,arr.range,arr.iqr)) > names(z) <- list('S.D.','Range','IQR') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Variability',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] 66.23394 217.10 84.9000 [2,] 76.67060 243.40 90.6000 [3,] 86.14627 254.45 102.9625 [4,] 92.45240 271.95 124.8500 [5,] 96.76215 299.40 135.2000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 78.94809 241.4282 87.34085 [2,] 93.34446 267.4718 118.58415 $out numeric(0) $group numeric(0) $names [1] "S.D." "Range" "IQR" Warning message: In bxp(list(stats = c(66.2339352735302, 76.6706017346054, 86.1462732450219, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1jhdn1438968037.ps tmp/1jhdn1438968037.png",intern=TRUE)) character(0) > try(system("convert tmp/2cpae1438968037.ps tmp/2cpae1438968037.png",intern=TRUE)) character(0) > try(system("convert tmp/3rxas1438968037.ps tmp/3rxas1438968037.png",intern=TRUE)) character(0) > try(system("convert tmp/49pf41438968037.ps tmp/49pf41438968037.png",intern=TRUE)) character(0) > try(system("convert tmp/53sh31438968037.ps tmp/53sh31438968037.png",intern=TRUE)) character(0) > try(system("convert tmp/6gobt1438968037.ps tmp/6gobt1438968037.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.278 0.395 2.696