R Under development (unstable) (2023-11-13 r85520 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.base) Loading required package: DoE.base Loading required package: grid Loading required package: conf.design Registered S3 method overwritten by 'DoE.base': method from factorize.factor 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 > set.seed(9890) > plan <- oa.design(nlevels=c(2,6,2), replications=2, repeat.only=TRUE) > y <- rnorm(24) > plan <- reptowide(add.response(plan,y)) > aggregate(plan) A B C y.1 y.2 y.mean 1 1 4 2 -0.39224352 0.1583592 -0.1169421 2 2 4 1 0.07865823 -0.8976024 -0.4094721 3 1 2 2 -1.48214807 -0.4415217 -0.9618349 4 2 5 2 0.32265070 0.7751938 0.5489222 5 2 2 1 0.38186754 1.9268409 1.1543542 6 1 3 1 -0.53596200 0.1081431 -0.2139094 7 1 6 2 -0.71544378 -1.0357310 -0.8755874 8 1 1 1 -0.63560324 -0.1404090 -0.3880061 9 1 5 1 0.56978357 0.8932284 0.7315060 10 2 3 2 1.32613941 -1.8503247 -0.2620927 11 2 1 2 -1.77654125 0.5134222 -0.6315595 12 2 6 1 0.35313718 -0.1274734 0.1128319 class=design, type= oa > > plan <- param.design(oa.design(nlevels=c(2,6,2), factor.names=c("C1","C2","C3")), oa.design(ID=L4.2.3)) > y <- rnorm(48) > plan <- paramtowide(add.response(plan,y)) > aggregate(plan) run.no run.no.std.rp C1 C2 C3 y.1 y.2 y.3 y.4 1 1 6 1 6 2 0.33050187 -0.99898809 -1.57373488 0.8098164 2 2 1 1 1 1 0.26917430 0.02680832 1.40963954 0.5843045 3 3 3 1 5 1 0.53331887 -0.25383087 -0.32972944 -1.4559479 4 4 9 2 6 1 1.13666598 -0.80708849 0.28101039 0.6209611 5 5 12 2 5 2 -2.13504546 0.48240468 0.03300627 -0.8204003 6 6 8 2 4 1 0.18389047 0.25306655 0.92149502 0.5224808 7 7 2 1 3 1 0.34656006 1.07084987 1.38067176 1.0613280 8 8 11 2 3 2 -0.70242039 0.89954911 -0.63547293 -0.6034677 9 9 4 1 2 2 0.08613301 -0.69196404 -1.22848093 -0.9658690 10 10 10 2 1 2 0.66385240 -0.87880862 0.45170537 0.2883888 11 11 7 2 2 1 0.18205128 0.69077382 0.34512256 -1.9038054 12 12 5 1 4 2 1.11882765 -0.08551355 -2.49918766 -0.5057387 y.mean 1 -0.3581012 2 0.5724817 3 -0.3765473 4 0.3078872 5 -0.6100087 6 0.4702332 7 0.9648524 8 -0.2604530 9 -0.7000452 10 0.1312845 11 -0.1714644 12 -0.4929031 class=design, type= oa.paramwide NOTE: columns run.no and run.no.std.rp are annotation, not part of the data frame Outer array: A B C 1 1 1 1 2 2 2 1 3 1 2 2 4 2 1 2 > aggregate(plan,response="y") run.no run.no.std.rp C1 C2 C3 y.1 y.2 y.3 y.4 1 1 6 1 6 2 0.33050187 -0.99898809 -1.57373488 0.8098164 2 2 1 1 1 1 0.26917430 0.02680832 1.40963954 0.5843045 3 3 3 1 5 1 0.53331887 -0.25383087 -0.32972944 -1.4559479 4 4 9 2 6 1 1.13666598 -0.80708849 0.28101039 0.6209611 5 5 12 2 5 2 -2.13504546 0.48240468 0.03300627 -0.8204003 6 6 8 2 4 1 0.18389047 0.25306655 0.92149502 0.5224808 7 7 2 1 3 1 0.34656006 1.07084987 1.38067176 1.0613280 8 8 11 2 3 2 -0.70242039 0.89954911 -0.63547293 -0.6034677 9 9 4 1 2 2 0.08613301 -0.69196404 -1.22848093 -0.9658690 10 10 10 2 1 2 0.66385240 -0.87880862 0.45170537 0.2883888 11 11 7 2 2 1 0.18205128 0.69077382 0.34512256 -1.9038054 12 12 5 1 4 2 1.11882765 -0.08551355 -2.49918766 -0.5057387 y.mean 1 -0.3581012 2 0.5724817 3 -0.3765473 4 0.3078872 5 -0.6100087 6 0.4702332 7 0.9648524 8 -0.2604530 9 -0.7000452 10 0.1312845 11 -0.1714644 12 -0.4929031 class=design, type= oa.paramwide NOTE: columns run.no and run.no.std.rp are annotation, not part of the data frame Outer array: A B C 1 1 1 1 2 2 2 1 3 1 2 2 4 2 1 2 > > plan <- param.design(oa.design(nlevels=c(2,6,2), factor.names=c("C1","C2","C3")), oa.design(ID=L4.2.3)) > plan <- paramtowide(plan) > aggregate(plan) run.no run.no.std.rp C1 C2 C3 y.1 y.2 y.3 y.4 y.mean 1 1 10 2 1 2 NA NA NA NA NA 2 2 12 2 5 2 NA NA NA NA NA 3 3 3 1 5 1 NA NA NA NA NA 4 4 7 2 2 1 NA NA NA NA NA 5 5 8 2 4 1 NA NA NA NA NA 6 6 5 1 4 2 NA NA NA NA NA 7 7 2 1 3 1 NA NA NA NA NA 8 8 4 1 2 2 NA NA NA NA NA 9 9 6 1 6 2 NA NA NA NA NA 10 10 9 2 6 1 NA NA NA NA NA 11 11 1 1 1 1 NA NA NA NA NA 12 12 11 2 3 2 NA NA NA NA NA class=design, type= oa.paramwide NOTE: columns run.no and run.no.std.rp are annotation, not part of the data frame Outer array: A B C 1 2 1 2 2 1 1 1 3 1 2 2 4 2 2 1 > > plan <- cross.design(oa.design(nlevels=c(2,6,2), factor.names=c("C1","C2","C3")), oa.design(ID=L4.2.3,replications=2,repeat.only=TRUE)) > y <- rnorm(96) > plan <- reptowide(add.response(plan,y)) > aggregate(plan) run.no run.no.std.rp C1 C2 C3 A B C y.1 y.2 y.mean 1 1 5_1 1 3 1 1 2 2 -0.456981688 1.20525343 0.37413587 2 2 5_4 2 4 1 1 1 1 1.359190661 1.02475853 1.19197460 3 3 5_3 1 4 2 2 1 2 -0.837649388 -0.08009385 -0.45887162 4 4 5_2 2 6 1 2 2 1 0.398263748 -2.40760309 -1.00466967 5 5 7_1 2 5 2 1 2 2 0.503876699 1.32526953 0.91457311 6 6 7_4 1 3 1 2 2 1 1.797834716 0.72640067 1.26211770 7 7 7_3 1 5 1 2 1 2 0.321665173 -0.06636930 0.12764794 8 8 7_2 2 1 2 1 1 1 0.407678653 -0.47925808 -0.03578972 9 9 6_1 2 2 1 2 1 2 -1.618855829 -0.38009740 -0.99947661 10 10 6_4 2 4 1 2 2 1 0.391496328 -1.46219867 -0.53535117 11 11 6_3 2 5 2 2 1 2 1.127470110 -1.97695044 -0.42474017 12 12 6_2 2 6 1 1 2 2 3.300247854 0.97964986 2.13994886 13 13 2_1 1 4 2 1 1 1 0.275881213 0.05569332 0.16578727 14 14 2_4 2 3 2 2 1 2 0.755211936 -1.74941827 -0.49710317 15 15 2_3 1 4 2 1 2 2 -0.403527833 0.32790480 -0.03781152 16 16 2_2 1 2 2 1 1 1 0.318789834 0.10662610 0.21270797 17 17 8_1 2 2 1 1 2 2 1.408833971 -0.98657760 0.21112818 18 18 8_4 1 3 1 2 1 2 -2.232634830 1.73500366 -0.24881558 19 19 8_3 2 1 2 2 1 2 0.605231072 0.56939310 0.58731209 20 20 8_2 1 4 2 2 2 1 0.884024341 0.68881556 0.78641995 21 21 3_1 1 2 2 2 2 1 1.385262612 0.60322624 0.99424443 22 22 3_4 1 6 2 1 2 2 0.460129008 0.91428984 0.68720942 23 23 3_3 2 3 2 1 1 1 -0.350818667 1.20209905 0.42564019 24 24 3_2 2 1 2 2 2 1 0.004150731 0.98806040 0.49610557 25 25 1_1 1 5 1 2 2 1 1.347906454 -2.28718775 -0.46964065 26 26 1_4 2 4 1 1 2 2 2.024801340 -0.18703021 0.91888557 27 27 1_3 2 5 2 2 2 1 0.484535132 0.29546993 0.39000253 28 28 1_2 2 3 2 2 2 1 -0.697424696 -0.27796286 -0.48769378 29 29 11_1 2 4 1 2 1 2 0.289349425 0.83814690 0.56374816 30 30 11_4 2 6 1 2 1 2 -0.312238907 -0.11581843 -0.21402867 31 31 11_3 2 2 1 2 2 1 -0.302581874 2.40945455 1.05343634 32 32 11_2 1 1 1 1 2 2 1.006740496 -1.33626355 -0.16476153 33 33 12_1 1 1 1 2 1 2 -0.185372884 -1.75104371 -0.96820830 34 34 12_4 1 2 2 2 1 2 1.126586104 1.94592014 1.53625312 35 35 12_3 1 5 1 1 2 2 -0.049970048 -1.71087359 -0.88042182 36 36 12_2 2 2 1 1 1 1 -1.261831976 0.25467252 -0.50357973 37 37 10_1 1 6 2 2 1 2 1.344743999 0.91337044 1.12905722 38 38 10_4 1 6 2 2 2 1 -1.419669434 0.73505495 -0.34230724 39 39 10_3 2 1 2 1 2 2 0.609202180 1.30655489 0.95787854 40 40 10_2 1 1 1 2 2 1 -1.089031823 -0.57319013 -0.83111098 41 41 4_1 2 6 1 1 1 1 0.361481577 -0.12147002 0.12000578 42 42 4_4 1 3 1 1 1 1 0.347991995 1.35235058 0.85017129 43 43 4_3 1 6 2 1 1 1 0.882847558 -1.46167418 -0.28941331 44 44 4_2 1 2 2 1 2 2 0.789351596 -0.81057389 -0.01061115 45 45 9_1 2 3 2 1 2 2 1.914716885 0.83229936 1.37350812 46 46 9_4 1 5 1 1 1 1 -1.347359672 1.29866384 -0.02434792 47 47 9_3 2 5 2 1 1 1 -0.131093111 -0.58929711 -0.36019511 48 48 9_2 1 1 1 1 1 1 -0.089439133 -0.01765185 -0.05354549 class=design, type= crossed NOTE: columns run.no and run.no.std.rp are annotation, not part of the data frame > aggregate(plan,response="y",FUN=sd) run.no run.no.std.rp C1 C2 C3 A B C y.1 y.2 y.sd 1 1 5_1 1 3 1 1 2 2 -0.456981688 1.20525343 1.17537773 2 2 5_4 2 4 1 1 1 1 1.359190661 1.02475853 0.23647923 3 3 5_3 1 4 2 2 1 2 -0.837649388 -0.08009385 0.53567266 4 4 5_2 2 6 1 2 2 1 0.398263748 -2.40760309 1.98404747 5 5 7_1 2 5 2 1 2 2 0.503876699 1.32526953 0.58081244 6 6 7_4 1 3 1 2 2 1 1.797834716 0.72640067 0.75761828 7 7 7_3 1 5 1 2 1 2 0.321665173 -0.06636930 0.27438181 8 8 7_2 2 1 2 1 1 1 0.407678653 -0.47925808 0.62715898 9 9 6_1 2 2 1 2 1 2 -1.618855829 -0.38009740 0.87593449 10 10 6_4 2 4 1 2 2 1 0.391496328 -1.46219867 1.31076030 11 11 6_3 2 5 2 2 1 2 1.127470110 -1.97695044 2.19515682 12 12 6_2 2 6 1 1 2 2 3.300247854 0.97964986 1.64091058 13 13 2_1 1 4 2 1 1 1 0.275881213 0.05569332 0.15569635 14 14 2_4 2 3 2 2 1 2 0.755211936 -1.74941827 1.77104101 15 15 2_3 1 4 2 1 2 2 -0.403527833 0.32790480 0.51720097 16 16 2_2 1 2 2 1 1 1 0.318789834 0.10662610 0.15002241 17 17 8_1 2 2 1 1 2 2 1.408833971 -0.98657760 1.69381177 18 18 8_4 1 3 1 2 1 2 -2.232634830 1.73500366 2.80554408 19 19 8_3 2 1 2 2 1 2 0.605231072 0.56939310 0.02534127 20 20 8_2 1 4 2 2 2 1 0.884024341 0.68881556 0.13803345 21 21 3_1 1 2 2 2 2 1 1.385262612 0.60322624 0.55298322 22 22 3_4 1 6 2 1 2 2 0.460129008 0.91428984 0.32114021 23 23 3_3 2 3 2 1 1 1 -0.350818667 1.20209905 1.09807865 24 24 3_2 2 1 2 2 2 1 0.004150731 0.98806040 0.69572920 25 25 1_1 1 5 1 2 2 1 1.347906454 -2.28718775 2.57039976 26 26 1_4 2 4 1 1 2 2 2.024801340 -0.18703021 1.56400109 27 27 1_3 2 5 2 2 2 1 0.484535132 0.29546993 0.13368929 28 28 1_2 2 3 2 2 2 1 -0.697424696 -0.27796286 0.29660431 29 29 11_1 2 4 1 2 1 2 0.289349425 0.83814690 0.38805842 30 30 11_4 2 6 1 2 1 2 -0.312238907 -0.11581843 0.13889025 31 31 11_3 2 2 1 2 2 1 -0.302581874 2.40945455 1.91769935 32 32 11_2 1 1 1 1 2 2 1.006740496 -1.33626355 1.65675405 33 33 12_1 1 1 1 2 1 2 -0.185372884 -1.75104371 1.10709646 34 34 12_4 1 2 2 2 1 2 1.126586104 1.94592014 0.57935665 35 35 12_3 1 5 1 1 2 2 -0.049970048 -1.71087359 1.17443616 36 36 12_2 2 2 1 1 1 1 -1.261831976 0.25467252 1.07233061 37 37 10_1 1 6 2 2 1 2 1.344743999 0.91337044 0.30502717 38 38 10_4 1 6 2 2 2 1 -1.419669434 0.73505495 1.52362023 39 39 10_3 2 1 2 1 2 2 0.609202180 1.30655489 0.49310283 40 40 10_2 1 1 1 2 2 1 -1.089031823 -0.57319013 0.36475516 41 41 4_1 2 6 1 1 1 1 0.361481577 -0.12147002 0.34149835 42 42 4_4 1 3 1 1 1 1 0.347991995 1.35235058 0.71018876 43 43 4_3 1 6 2 1 1 1 0.882847558 -1.46167418 1.65782722 44 44 4_2 1 2 2 1 2 2 0.789351596 -0.81057389 1.13131816 45 45 9_1 2 3 2 1 2 2 1.914716885 0.83229936 0.76538477 46 46 9_4 1 5 1 1 1 1 -1.347359672 1.29866384 1.87102117 47 47 9_3 2 5 2 1 1 1 -0.131093111 -0.58929711 0.32399915 48 48 9_2 1 1 1 1 1 1 -0.089439133 -0.01765185 0.05076127 class=design, type= crossed NOTE: columns run.no and run.no.std.rp are annotation, not part of the data frame > > proc.time() user system elapsed 0.67 0.10 0.76