Closed emitanaka closed 1 year ago
Oh actually first part was supposed to be:
library(edibble)
design() %>%
set_units(pen = fct_attrs(levels = lvl_attrs(3))) %>%
serve_table()
#> # An edibble: 1 x 1
#> pen
#> <unit(1)>
#> 1 3
Okay, it's supposed to be like below.
library(edibble)
design() %>%
set_units(pen = lvl_attrs(3)) %>%
serve_table()
#> # An edibble: 1 x 1
#> pen
#> <unit(1)>
#> 1 3
Now I remember why I allowed for the first specification. The first specification still allows for the shorthand expression of the levels whilst specifying the factor metadata. Is this a wise thing to do? I guess it's fair. For strict level specification, one should use lvl_attrs
, for strict factor specification, one should use fct_attrs
. If you want both to be strict, use both.
fixed in the new internals
Above is supposed to be
Also
is supposed to be numeric values!