
Plot diagnostics of gridded OFE
plot_gridded_ofe.RdReturns a plot with the following attributes:
- Original Data
TOP LEFT. The raw data in the projected space.
- Rough Rotation
TOP RIGHT Rotated original data with alternative strips highlighted. If each strip is not a single colour, the rotation is insufficient. In practice only the first strip needs to be identified correctly, however it is best to ensure all strips are identified.
- Gridded Data (Raw)
BOTTOM LEFT The accurate rotated, gridded data. Strips should be vertically aligned. NAs will display in red. The number of NAs should be relatively small, concentrated around the edges where strips do not begin at the same point (if ends were trimmed these should not be present) and in holes where data is missing. Red horizontal lines indicate that too many rows have been specified. Large NA concentrations in all four corners indicates the rotation has likely failed.
- Gridded Data (Projected)
BOTTOM RIGHT The gridded data projected back to the original data space. This should look similar to the original data - if it does not the process has likely failed and the other plots should be inspected to establish why.
Author
Braden Thorne, braden.thorne@curtin.edu.au
Examples
if (FALSE) { # requireNamespace("asreml", quietly = TRUE)
library(CBADASReml)
data <- agridat::lasrosas.corn |>
filter(year == 2001) |>
rename(
Yield = yield,
Treatment = nf,
Rep = rep
) |>
dplyr::select(Yield, Treatment, Rep, long, lat) |>
st_as_sf(coords = c("long", "lat"), crs = 4326) |>
st_transform(3395)
gridded_data <- ofe_grid_data(data, -60, 80, 5, 18, trim_ends=FALSE)
plot_gridded_ofe(gridded_data)
}