| plot_design_summary | R Documentation |
Plots the structure that drove the detect_design() verdict. A detected MET
uses a compact environment-coverage overview by default. Set environment
to draw one selected environment. A single-trial panel depends on the
detected design class:
plot_design_summary(
x,
df,
engine = c("base", "ggplot2"),
environment = NULL,
...
)
x |
A |
df |
The data frame that was passed to |
engine |
|
environment |
Optional single environment label. For a detected MET, the default is a compact all-environment overview. Supplying a label draws the selected environment's field layout or legacy design diagnostic. |
... |
Ignored. |
CRD, factorial, none -> frequency-of-treatment + NA-pattern.
RCBD, IBD/alpha-lattice -> treatment x block replication tile.
row-column -> spatial layout tile (row x col, fill =
treatment).
split-plot -> factor-nesting tree + within-block replication.
Output is purely diagnostic. Do not use it as a publication figure
(use desplot::desplot() or ggplot2-based packages for that).
With engine = "ggplot2", the ggplot object, so it can be
modified or saved with ggplot2::ggsave(); nothing is drawn until it is
printed. With engine = "base", the input x invisibly, after the plot
has been drawn.
if (requireNamespace("agridat", quietly = TRUE)) {
d <- agridat::john.alpha
ds <- detect_design(d)
plot(ds, df = d)
}
met <- expand.grid(
env = factor(c("E1", "E2")),
rep = factor(seq_len(2L)),
gen = factor(c("G1", "G2", "G3"))
)
met$yield <- seq_len(nrow(met))
met_design <- detect_design(met, env = "env")
plot(met_design, df = met)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.