check_ortho_with_chars {ofpetrial} | R Documentation |
Check the orthogonality with field/topographic characteristics
Description
Check the orthogonality of the trial input rates and observed characteristics provided by the user
Usage
check_ortho_with_chars(td, sp_data_list, vars_list)
Arguments
td |
(tibble) trial design data created by make_exp_plots() and assign_rates() |
sp_data_list |
(list) list of spatial datasets as 'sf' from the 'sf' package or 'SpatRaster' from the 'terra' package |
vars_list |
(list) list of character vectors indicating the name of the variables to be used in the datasets specified in sp_data_list |
Value
a list
Examples
data(td_single_input)
yield_sf <- sf::st_read(system.file("extdata", "yield-simple1.shp", package = "ofpetrial"))
ssurgo_sf <-
sf::st_read(system.file("extdata", "ssurgo-simple1.shp", package = "ofpetrial")) %>%
dplyr::mutate(mukey = factor(mukey))
topo_rast <-
c(
terra::rast(system.file("extdata", "slope.tif", package = "ofpetrial")),
terra::rast(system.file("extdata", "twi.tif", package = "ofpetrial"))
)
checks <-
check_ortho_with_chars(
td = td_single_input,
sp_data_list = list(yield_sf, ssurgo_sf, topo_rast),
vars_list = list("Yld_Vol_Dr", c("mukey", "clay"), names(topo_rast))
)
checks$summary_data[[1]]
checks$summary_fig[[1]]
[Package ofpetrial version 0.1.1 Index]