R Under development (unstable) (2023-08-20 r84995 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. > require(DoE.wrapper) Loading required package: DoE.wrapper Loading required package: FrF2 Loading required package: DoE.base Loading required package: grid Loading required package: conf.design Attaching package: 'DoE.base' The following objects are masked from 'package:stats': aov, lm The following object is masked from 'package:graphics': plot.design The following object is masked from 'package:base': lengths Loading required package: rsm > ## try out all available designs with and without factor names > options(warn=-1) > > set.seed(1234) > bbd.design(3) A B C 1 -1 0 1 2 -1 -1 0 3 1 0 1 4 0 0 0 5 0 0 0 6 0 1 -1 7 0 1 1 8 -1 1 0 9 1 -1 0 10 1 1 0 11 1 0 -1 12 0 -1 -1 13 0 -1 1 14 0 0 0 15 -1 0 -1 16 0 0 0 class=design, type= bbd > bbd.design(4) A B C D 1 0 0 1 1 2 0 1 -1 0 3 0 0 -1 1 4 -1 0 1 0 5 -1 1 0 0 6 0 -1 0 -1 7 -1 0 0 -1 8 1 1 0 0 9 0 1 0 -1 10 0 1 1 0 11 1 -1 0 0 12 -1 -1 0 0 13 0 0 1 -1 14 -1 0 -1 0 15 0 0 0 0 16 0 0 -1 -1 17 0 -1 1 0 18 1 0 -1 0 19 -1 0 0 1 20 0 0 0 0 21 0 0 0 0 22 0 0 0 0 23 1 0 1 0 24 0 1 0 1 25 1 0 0 -1 26 0 -1 -1 0 27 1 0 0 1 28 0 -1 0 1 class=design, type= bbd > bbd.design(5) A B C D E 1 0 1 0 0 1 2 0 -1 -1 0 0 3 0 1 0 0 -1 4 -1 0 0 0 -1 5 0 1 0 -1 0 6 -1 0 1 0 0 7 0 -1 1 0 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42 0 0 0 0 0 0 0 43 0 0 0 -1 1 1 0 44 0 1 -1 0 0 -1 0 45 -1 1 0 1 0 0 0 46 0 0 1 1 0 0 -1 47 -1 -1 0 1 0 0 0 48 0 -1 1 0 0 1 0 49 0 1 1 0 0 1 0 50 0 0 0 0 0 0 0 51 -1 0 1 0 1 0 0 52 1 0 0 0 0 -1 1 53 0 1 -1 0 0 1 0 54 -1 0 -1 0 1 0 0 55 -1 0 0 0 0 -1 -1 56 0 0 0 0 0 0 0 57 0 0 0 1 -1 -1 0 58 1 0 0 0 0 1 1 59 0 1 1 0 0 -1 0 60 0 1 0 0 -1 0 -1 class=design, type= bbd > bbd.design(4,block.name="blocks") blocks A B C D 1 1 0 0 0 0 2 1 0 0 0 0 3 1 0 0 -1 1 4 1 -1 1 0 0 5 1 0 0 1 1 6 1 0 0 -1 -1 7 1 1 -1 0 0 8 1 0 0 0 0 9 1 -1 -1 0 0 10 1 0 0 1 -1 11 1 1 1 0 0 12 1 0 0 0 0 13 2 0 0 0 0 14 2 -1 0 0 -1 15 2 0 0 0 0 16 2 0 0 0 0 17 2 0 0 0 0 18 2 0 -1 1 0 19 2 -1 0 0 1 20 2 0 -1 -1 0 21 2 0 1 -1 0 22 2 1 0 0 -1 23 2 0 1 1 0 24 2 1 0 0 1 25 3 0 0 0 0 26 3 -1 0 -1 0 27 3 0 0 0 0 28 3 1 0 1 0 29 3 0 1 0 -1 30 3 1 0 -1 0 31 3 0 -1 0 -1 32 3 0 1 0 1 33 3 0 0 0 0 34 3 0 -1 0 1 35 3 -1 0 1 0 36 3 0 0 0 0 class=design, type= bbd.blocked > bbd.design(5,block.name="blocks") blocks A B C D E 1 1 0 0 0 0 0 2 1 0 -1 0 0 1 3 1 -1 0 1 0 0 4 1 1 0 -1 0 0 5 1 0 0 0 0 0 6 1 0 -1 0 0 -1 7 1 0 1 0 0 -1 8 1 1 -1 0 0 0 9 1 -1 0 -1 0 0 10 1 0 0 1 -1 0 11 1 -1 1 0 0 0 12 1 0 0 0 0 0 13 1 0 0 0 -1 1 14 1 0 1 0 0 1 15 1 0 0 1 1 0 16 1 0 0 0 0 0 17 1 0 0 0 1 1 18 1 1 0 1 0 0 19 1 -1 -1 0 0 0 20 1 0 0 -1 1 0 21 1 0 0 0 1 -1 22 1 0 0 0 -1 -1 23 1 0 0 -1 -1 0 24 1 1 1 0 0 0 25 2 1 0 0 0 1 26 2 0 -1 0 1 0 27 2 1 0 0 -1 0 28 2 0 -1 -1 0 0 29 2 1 0 0 0 -1 30 2 -1 0 0 0 -1 31 2 0 0 -1 0 1 32 2 1 0 0 1 0 33 2 0 0 1 0 1 34 2 0 -1 1 0 0 35 2 0 0 0 0 0 36 2 0 -1 0 -1 0 37 2 0 0 0 0 0 38 2 0 1 0 1 0 39 2 0 0 1 0 -1 40 2 -1 0 0 1 0 41 2 0 1 -1 0 0 42 2 -1 0 0 0 1 43 2 0 1 1 0 0 44 2 0 0 0 0 0 45 2 0 1 0 -1 0 46 2 0 0 -1 0 -1 47 2 -1 0 0 -1 0 48 2 0 0 0 0 0 class=design, type= bbd.blocked > bbd.design(3,factor.names=Letters[23:25]) X Y Z 1 0 0 0 2 0 1 -1 3 1 -1 0 4 1 1 0 5 0 0 0 6 1 0 1 7 -1 1 0 8 0 -1 1 9 0 0 0 10 -1 0 1 11 0 0 0 12 -1 0 -1 13 -1 -1 0 14 0 1 1 15 1 0 -1 16 0 -1 -1 class=design, type= bbd > bbd.design(3,factor.names=list(X=c(0,10),Y=c(-10,+10),Z=c(223,277))) X Y Z 1 5 0 250 2 0 0 277 3 5 0 250 4 0 -10 250 5 5 0 250 6 5 0 250 7 10 10 250 8 10 0 223 9 0 10 250 10 5 -10 223 11 5 10 277 12 5 10 223 13 5 -10 277 14 0 0 223 15 10 -10 250 16 10 0 277 class=design, type= bbd > bbd.design(3,block.name="blocks",factor.names=Letters[23:25]) X Y Z 1 1 0 1 2 0 1 1 3 -1 -1 0 4 -1 0 -1 5 0 -1 -1 6 -1 1 0 7 0 1 -1 8 -1 0 1 9 1 -1 0 10 0 -1 1 11 0 0 0 12 0 0 0 13 1 1 0 14 1 0 -1 15 0 0 0 16 0 0 0 class=design, type= bbd > plan <- bbd.design(3,block.name="blocks",factor.names=list(X=c(0,10),Y=c(-10,+10),Z=c(223,277))) > design.info(plan) $type [1] "bbd" $nruns [1] 16 $nfactors [1] 3 $factor.names $factor.names$X [1] 0 10 $factor.names$Y [1] -10 10 $factor.names$Z [1] 223 277 $quantitative [1] TRUE TRUE TRUE $randomize [1] TRUE $seed NULL $replications [1] 1 $repeat.only [1] FALSE $ncenter [1] 4 $creator bbd.design(3, block.name = "blocks", factor.names = list(X = c(0, 10), Y = c(-10, +10), Z = c(223, 277))) $coding $coding$x1 x1 ~ (X - 5)/5 $coding$x2 x2 ~ (Y - 0)/10 $coding$x3 x3 ~ (Z - 250)/27 > run.order(plan) run.no.in.std.order run.no run.no.std.rp 1 6 1 6 2 15 2 15 3 2 3 2 4 10 4 10 5 14 5 14 6 13 6 13 7 5 7 5 8 4 8 4 9 8 9 8 10 3 10 3 11 11 11 11 12 16 12 16 13 7 13 7 14 1 14 1 15 9 15 9 16 12 16 12 > desnum(plan) X Y Z 1 1 0 -1 2 0 0 0 3 1 -1 0 4 0 1 -1 5 0 0 0 6 0 0 0 7 -1 0 -1 8 1 1 0 9 1 0 1 10 -1 1 0 11 0 -1 1 12 0 0 0 13 -1 0 1 14 -1 -1 0 15 0 -1 -1 16 0 1 1 > bbd.design(4,factor.names=Letters[22:25]) W X Y Z 1 0 -1 -1 0 2 1 -1 0 0 3 0 0 -1 -1 4 -1 1 0 0 5 1 0 1 0 6 0 1 0 1 7 0 0 0 0 8 0 1 1 0 9 0 0 0 0 10 0 -1 1 0 11 -1 0 0 1 12 0 0 0 0 13 0 1 -1 0 14 -1 0 0 -1 15 -1 0 1 0 16 0 0 1 -1 17 0 1 0 -1 18 1 0 0 -1 19 1 1 0 0 20 1 0 0 1 21 0 -1 0 -1 22 -1 0 -1 0 23 0 0 0 0 24 -1 -1 0 0 25 0 0 1 1 26 0 -1 0 1 27 1 0 -1 0 28 0 0 -1 1 class=design, type= bbd > bbd.design(4,factor.names=list(W="",X=c(0,10),Y=c(-10,+10),Z=c(223,277))) W X Y Z 1 0 5 -10 277 2 0 0 0 277 3 1 0 0 250 4 0 5 10 277 5 1 5 0 223 6 -1 5 10 250 7 1 5 0 277 8 0 5 10 223 9 -1 5 0 223 10 0 5 -10 223 11 0 10 0 277 12 0 5 0 250 13 -1 10 0 250 14 0 10 0 223 15 0 0 0 223 16 1 5 -10 250 17 1 10 0 250 18 0 5 0 250 19 -1 5 0 277 20 0 0 10 250 21 -1 5 -10 250 22 0 10 10 250 23 0 5 0 250 24 -1 0 0 250 25 0 5 0 250 26 1 5 10 250 27 0 10 -10 250 28 0 0 -10 250 class=design, type= bbd > bbd.design(4,block.name="blocks",factor.names=Letters[22:25]) blocks W X Y Z 1 1 1 1 0 0 2 1 1 -1 0 0 3 1 0 0 0 0 4 1 0 0 1 -1 5 1 0 0 0 0 6 1 -1 -1 0 0 7 1 0 0 -1 -1 8 1 -1 1 0 0 9 1 0 0 -1 1 10 1 0 0 1 1 11 1 0 0 0 0 12 1 0 0 0 0 13 2 0 0 0 0 14 2 0 1 1 0 15 2 -1 0 0 1 16 2 0 0 0 0 17 2 0 -1 1 0 18 2 1 0 0 1 19 2 0 0 0 0 20 2 -1 0 0 -1 21 2 0 -1 -1 0 22 2 1 0 0 -1 23 2 0 1 -1 0 24 2 0 0 0 0 25 3 0 -1 0 1 26 3 1 0 -1 0 27 3 -1 0 -1 0 28 3 0 0 0 0 29 3 0 -1 0 -1 30 3 0 0 0 0 31 3 0 1 0 1 32 3 -1 0 1 0 33 3 0 0 0 0 34 3 1 0 1 0 35 3 0 1 0 -1 36 3 0 0 0 0 class=design, type= bbd.blocked > bbd.design(4,block.name="blocks",factor.names=list(W="",X=c(0,10),Y=c(-10,+10),Z=c(223,277))) blocks W X Y Z 1 1 0 5 0 250 2 1 0 5 0 250 3 1 1 10 0 250 4 1 0 5 10 223 5 1 0 5 0 250 6 1 0 5 10 277 7 1 -1 10 0 250 8 1 0 5 0 250 9 1 -1 0 0 250 10 1 0 5 -10 277 11 1 1 0 0 250 12 1 0 5 -10 223 13 2 0 10 10 250 14 2 0 0 -10 250 15 2 0 5 0 250 16 2 0 5 0 250 17 2 0 5 0 250 18 2 0 0 10 250 19 2 0 10 -10 250 20 2 1 5 0 277 21 2 -1 5 0 277 22 2 0 5 0 250 23 2 1 5 0 223 24 2 -1 5 0 223 25 3 0 5 0 250 26 3 0 0 0 277 27 3 -1 5 -10 250 28 3 1 5 -10 250 29 3 0 10 0 277 30 3 1 5 10 250 31 3 0 5 0 250 32 3 -1 5 10 250 33 3 0 10 0 223 34 3 0 0 0 223 35 3 0 5 0 250 36 3 0 5 0 250 class=design, type= bbd.blocked > > ## randomize=FALSE > run.order(bbd.design(7,randomize=FALSE)) run.no.in.std.order run.no run.no.std.rp 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29 29 30 30 30 30 31 31 31 31 32 32 32 32 33 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 37 37 37 37 38 38 38 38 39 39 39 39 40 40 40 40 41 41 41 41 42 42 42 42 43 43 43 43 44 44 44 44 45 45 45 45 46 46 46 46 47 47 47 47 48 48 48 48 49 49 49 49 50 50 50 50 51 51 51 51 52 52 52 52 53 53 53 53 54 54 54 54 55 55 55 55 56 56 56 56 57 57 57 57 58 58 58 58 59 59 59 59 60 60 60 60 > run.order(bbd.design(4,block.name="blocks",randomize=FALSE)) run.no.in.std.order run.no run.no.std.rp 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 28 28 28 29 29 29 29 30 30 30 30 31 31 31 31 32 32 32 32 33 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 > > ## randomize with seed > plan1 <- run.order(bbd.design(7,seed=28672)) > plan2 <- run.order(bbd.design(7,seed=28672)) > identical(plan1, plan2) [1] TRUE > > ## default levels > bbd.design(3, default.levels=c(0,100)) A B C 1 0 100 50 2 50 100 100 3 100 100 50 4 50 0 100 5 50 50 50 6 0 50 100 7 50 50 50 8 50 100 0 9 100 50 0 10 100 0 50 11 50 50 50 12 50 0 0 13 0 0 50 14 0 50 0 15 100 50 100 16 50 50 50 class=design, type= bbd > bbd.design(4,factor.names=list(W="",X=c(0,10),Y=c(-10,+10),Z=c(223,277)), + default.levels=c(0,100)) W X Y Z 1 50 5 10 223 2 50 0 -10 250 3 50 10 0 223 4 50 5 0 250 5 50 5 -10 223 6 50 5 0 250 7 0 10 0 250 8 100 5 0 277 9 100 5 0 223 10 100 0 0 250 11 50 5 0 250 12 100 10 0 250 13 50 10 -10 250 14 0 5 -10 250 15 0 5 10 250 16 50 5 0 250 17 50 0 0 277 18 0 0 0 250 19 100 5 -10 250 20 0 5 0 223 21 50 0 0 223 22 100 5 10 250 23 50 0 10 250 24 50 10 0 277 25 50 5 10 277 26 0 5 0 277 27 50 5 -10 277 28 50 10 10 250 class=design, type= bbd > > proc.time() user system elapsed 1.10 0.21 1.31