Plot fieldbook sketches for Splitplot-RCBD experimental designs generated
by design_split_rcbd().
plot_split_rcbd_design(
data,
factor = NA,
fill = "plots",
xlab = NULL,
ylab = NULL,
glab = NULL,
text_size = NULL,
wrap_width = NULL,
font_family = "Open Sans",
font_face = "plain"
)A ggplot object.
Fieldbook data frame from design_split_rcbd().
Character scalar. Column used to color experimental units.
If missing, "wp_sp" is used when available; otherwise, "ntreat" is
used.
Character vector. Column or columns used as labels inside each
experimental unit. Default is "plots".
Character scalar. Optional x axis title.
Character scalar. Optional y axis title.
Character scalar. Optional legend title.
Optional positive numeric scalar indicating the plot-label
font size in typographic points (pt). If NULL or NA, the function
calculates an automatic size: 10 pt for one label column, 8 pt for two
columns and 7 pt for three or more columns.
Optional positive integer indicating the approximate
maximum number of characters per line. If NULL or NA, labels are not
wrapped. Underscores are displayed as spaces only in the sketch.
Font family used in the sketch. Defaults to
"Open Sans". If it or the optional systemfonts package is unavailable,
the function silently uses "sans".
Font face used in the sketch. Defaults to "plain",
equivalent to regular/normal text.
Each block is displayed in a separate panel. Within each block:
cols identifies the whole-plot position on the x axis.
The ranked rows values identify subplot positions on the y axis.
A black external border identifies each whole plot.
Label wrapping changes only the displayed text. It does not modify
plots, ntreat, treatment factors, QR codes or any other fieldbook value.
text_size is expressed in points, like common word processors. Internally
it is converted to the size unit expected by ggplot2::geom_text().
The visible design name is Splitplot-RCBD, while the stable internal
identifier remains "split-rcbd".
if (FALSE) {
plot_split_rcbd_design(
data = fieldbook,
factor = "wp_sp",
fill = c("plots", "ntreat"),
text_size = 9,
wrap_width = 14,
font_family = "Open Sans",
font_face = "plain"
)
}
Run the code above in your browser using DataLab