Agricultural Experimental Designs in R
A tutorial R package demonstrating the analysis of five classical experimental designs used in agricultural research. Each design includes a built-in dataset and a detailed vignette covering the full analysis pipeline.
Installation
# Install from GitHub
devtools::install_github("emantzoo/agrideshr", build_vignettes = TRUE)Designs Covered
| # | Design | Vignette | When to Use |
|---|---|---|---|
| 1 | Completely Randomized (CRD) | vignette("01-crd") |
Homogeneous units, one factor |
| 2 | Randomized Complete Block (RCBD) | vignette("02-rcbd") |
One known source of variability |
| 3 | Latin Square | vignette("03-latin-square") |
Two sources of variability (rows + columns) |
| 4 | Factorial | vignette("04-factorial") |
Two+ crossed factors, interest in interactions |
| 5 | Split-Plot | vignette("05-split-plot") |
Two factors with restricted randomisation |
Which Design Should I Use?
Start
|
+-- How many treatment factors?
|
+-- ONE factor
| |
| +-- Are experimental units homogeneous?
| |
| +-- YES --> CRD
| |
| +-- NO, one source of variability --> RCBD
| |
| +-- NO, two sources (grid layout) --> Latin Square
|
+-- TWO or more factors
|
+-- Can all factors be fully randomised?
|
+-- YES --> Factorial Design
|
+-- NO, one factor is harder to change --> Split-Plot
Each Vignette Covers
- When to Use – decision criteria
- The Design – model equation and layout
-
Data – package dataset with
data() - Exploratory Visualization – ggplot2 plots
-
Model Fitting –
aov()orlmer() - Assumption Checking – Q-Q plot, Shapiro-Wilk, Levene’s test
-
Post-hoc Comparisons – Tukey HSD and
emmeanscontrasts - Conclusion – summary and links to the next design
