This is the mldoeR
package. It contains a catalog of regular four-and-two-level designs. It also contains useful functions to handle and analyze those designs.
For visualization purposes, you might want to generate a search-table. The searchTable()
function makes this possible for two-level designs. The search-table for \(2^{6-2}\) designs of resolution \(III\) looks like this.
st <- searchtable(k = 4, p = 2, R = 3)
print(st)
#> # A tibble: 11 × 3
#> gen f g
#> <chr> <chr> <chr>
#> 1 ab abf abg
#> 2 ac acf acg
#> 3 bc bcf bcg
#> 4 abc abcf abcg
#> 5 ad adf adg
#> 6 bd bdf bdg
#> 7 abd abdf abdg
#> 8 cd cdf cdg
#> 9 acd acdf acdg
#> 10 bcd bcdf bcdg
#> 11 abcd abcdf abcdg
If you want to generate search-table for mixed-level designs, the mSearchtable()
function is there. For example, you can generate the search-table for \(4^{1}2^{5}\) designs of resolution \(III\) in \(2^5\) runs.
mST <- mixed_searchtable(m = 1, k = 5, p = 2, R = 3)
print(mST)
#> # A tibble: 25 × 4
#> generators f g h
#> <chr> <chr> <chr> <chr>
#> 1 cd cdf cdg cdh
#> 2 ce cef ceg ceh
#> 3 de def deg deh
#> 4 ac acf acg ach
#> 5 bc bcf bcg bch
#> 6 abc abcf abcg abch
#> 7 ad adf adg adh
#> 8 bd bdf bdg bdh
#> 9 abd abdf abdg abdh
#> 10 ae aef aeg aeh
#> # … with 15 more rows
In these search-table, the generators are presented as strings. However, you can easily get the number representation of a generator, from its string, using the char2num()
function.
gen = "acd"
char2num(gen)
#> [1] 13
The num2char()
function allows you to do the invert operation.
num2char(13)
#> [1] "acd"