When you construct an experimental design, there are many intermediate steps along the way before you are ready to serve your design. edibble stores these intermediate constructs as an edibble design (EddibbleDesign) which you can visualise in a number of ways.


new_rcbd <- function() {
  start_design(name = "RCBD") %>%
  set_units(block = c("B1", "B2"),
            unit = nested_in(block, 6)) %>%
  set_trts(trt = LETTERS[1:4]) %>%
  allocate_trts(~unit) %>%

rcbd <- new_rcbd()

#> [1] "EdibbleDesign" "R6"

An EdibbleDesign contains a graph and table. The default print out is the same as edbl_graph.

Plot for edbl_graph

There are two views available for edbl_graph: high-level view and low-level view. The high-level view is designed for the user to see the overview of variable relations. [ADD link to other document with more explanation.]


There is also a low-level view of this.

plot(rcbd, view = "low")

Formatting plot output for edbl_graph

If you don’t like these aspects, you can in fact overwrite this. There are two ways you can do this.

  1. edbl_graph is just an igraph under the hood and it’s leveraging the plot method there which means you can customise it the way it is done for igraph,
  2. Modify the options output. You can see the full list of available options by printing edibble:::op.edibble with a few shown below.
options(edibble.vertex.shape.trt = "circle",
        edibble.edge.width.t2v = 3,
        edibble.vertex.fill.trt = "black")

This option is only applied to newly constructed designs so let’s reconstruct the same design.

rcbd2 <- new_rcbd()