Incorporating Spatial Analysis into Agricultural Field Experiments.
August 21, 2023
Vincent Van Gogh
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.
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.
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|
|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:
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|
|MIXED, GLIMMIX||mixed model analysis|
|VARIOGRAM||empirical variogram estimation|
Julia Piaskowski wrote the R sections and William Price wrote the SAS portions of this tutorial.
This book was written in bookdown.
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