Skip to contents

Convert an object of class `design` to `tibble`

Usage

design_to_tibble(design)

Arguments

design

An object of class `design`

Value

Converted design to tibble

Examples

dat <- DoE.base::fac.design(factor.names = list(temp = c(16,32),
time = c(4,12)),replications = 5, randomize = FALSE)
#> Registered S3 method overwritten by 'DoE.base':
#>   method           from       
#>   factorize.factor conf.design
#> creating full factorial with 4 runs ...
Thk <- c(116.1, 106.7, 116.5, 123.2, 116.9, 107.5, 115.5, 125.1, 112.6, 105.9,
119.2, 124.5, 118.7, 107.1, 114.7, 124, 114.9, 106.5, 118.3, 124.7)
design <- DoE.base::add.response(dat, Thk)
design
#>    run.no run.no.std.rp temp time Blocks   Thk
#> 1       1           1.1   16    4     .1 116.1
#> 2       2           2.1   32    4     .1 106.7
#> 3       3           3.1   16   12     .1 116.5
#> 4       4           4.1   32   12     .1 123.2
#> 5       5           1.2   16    4     .2 116.9
#> 6       6           2.2   32    4     .2 107.5
#> 7       7           3.2   16   12     .2 115.5
#> 8       8           4.2   32   12     .2 125.1
#> 9       9           1.3   16    4     .3 112.6
#> 10     10           2.3   32    4     .3 105.9
#> 11     11           3.3   16   12     .3 119.2
#> 12     12           4.3   32   12     .3 124.5
#> 13     13           1.4   16    4     .4 118.7
#> 14     14           2.4   32    4     .4 107.1
#> 15     15           3.4   16   12     .4 114.7
#> 16     16           4.4   32   12     .4 124.0
#> 17     17           1.5   16    4     .5 114.9
#> 18     18           2.5   32    4     .5 106.5
#> 19     19           3.5   16   12     .5 118.3
#> 20     20           4.5   32   12     .5 124.7
#> class=design, type= full factorial 
#> NOTE: columns run.no and run.no.std.rp  are annotation, 
#>  not part of the data frame
design_to_tibble(design)
#> # A tibble: 20 × 4
#>     temp  time Blocks   Thk
#>    <dbl> <dbl>  <dbl> <dbl>
#>  1    16     4    0.1  116.
#>  2    32     4    0.1  107.
#>  3    16    12    0.1  116.
#>  4    32    12    0.1  123.
#>  5    16     4    0.2  117.
#>  6    32     4    0.2  108.
#>  7    16    12    0.2  116.
#>  8    32    12    0.2  125.
#>  9    16     4    0.3  113.
#> 10    32     4    0.3  106.
#> 11    16    12    0.3  119.
#> 12    32    12    0.3  124.
#> 13    16     4    0.4  119.
#> 14    32     4    0.4  107.
#> 15    16    12    0.4  115.
#> 16    32    12    0.4  124 
#> 17    16     4    0.5  115.
#> 18    32     4    0.5  106.
#> 19    16    12    0.5  118.
#> 20    32    12    0.5  125.