# Sample variogram of plot errors simulated using a separable first order
# autoregressive (AR1) process.
error_df <- field_trial_error(
ntraits = 1,
nenvs = 1,
spatial.model = "AR1"
)
variogram <- sample_variogram(
df = error_df,
effect = "e.Trait1"
)
# Sample variogram
variogram
# Extract the data frame with the column and row displacements, and the
# average semivariances.
variogram_df <- variogram$data
Run the code above in your browser using DataLab