Section 1 Preface

Vincent Van Gogh

1.1 Tutorial goal

To help people conducting planned agricultural field trials understand and incorporate spatial variation routinely into analysis of field trials.

Current educational resources are focused largely on geospatial applications that typically require a a moderate to deep understanding of mapping tools and spatial analytic techniques. Furthermore, there is not a comprehensive resources for spatial analytic techniques for field experiments that is also freely available. This tutorial is intended to fill that gap.

1.2 Prerequisites

In order to run the scripts in this demonstration, you will to download R, available free through the Comprehensive R Archive Network (CRAN). While this is sufficient for running R scripts, You may also find it helpful to use RStudio, which provides a nice graphical user interface for R. RStudio can be downloaded here.

If you already have R installed, please make sure you have version 4.0.0 or newer.

This demonstration is not intended to provide instructions on general R usage. However, There are numerous web resources for learning the Basics of R. Software carpentry offers several lesson plans covering the foundation of R.

1.3 R requirements

This tutorial was built using R version 4.1 (“Camp Pontanezen”). R session information is provided in section 9.

R Packages used in this tutorial

Package Usage in This Tutorial
dplyr, tidyr, purrr basic data manipulation
ggplot, desplot plotting
agridat contains demonstration data sets
sp, sf standard manipulation of spatial objects
spdep spatial dependence functions
gstat empirical variogram estimation
nlme, lme4 mixed model analysis
emmeans extract treatments means
spaMM Matérn covariance structure
SpATS spatial splines for field trials
breedR mixed modelling with AR1xAR1 estimation

All packages aside from breedR are available on CRAN. The package breedR, is available on GitHub can be installed within R with the following code:

remotes::install_github("famuvie/breedR")

1.4 SAS requirements

In order to run the SAS portion of this tutorial, a valid copy of SAS Base and Stat products and a current SAS license are required. This tutorial was built using SAS 9.4 (TS1M5). Although older versions of SAS may also work, we have not evaluated this. Users can also consider downloading and using a free version of SAS® On Demand for Academics: Studio.

SAS procedures used in this tutorial

Procedure Usage in This Tutorial
FORMAT, DATA, PRINT basic data input, manipulation, and display
SORT, RANK sort and rank estimated means
SGPLOT plotting
MIXED, GLIMMIX mixed model analysis
VARIOGRAM empirical variogram estimation

1.5 Contributors

Julia Piaskowski wrote the R sections and William Price wrote the SAS portions of this tutorial.

This book was written in bookdown.

1.6 License

Incorporating Spatial Analysis into Agricultural Field Experiments by Julia Piaskowski and William Price is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License


  1. University of Idaho, ↩︎

  2. University of Idaho, ↩︎