## ----include = FALSE------------------------------------------------------------------------------
old_options <- options(width = 100)
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 4.4, dpi = 72, out.width = "100%")
library(AgriDesign)

## -------------------------------------------------------------------------------------------------
dz <- design_anova(disease_scores, "Severity_score", "Fungicide", block = "Block")
np <- nonparametric(dz)
np
plot(np)

## -------------------------------------------------------------------------------------------------
durbin_test(bib_sorghum, "Yield_t_ha", "Hybrid", "Block")$test
waerden_test(bean_varieties, "Yield_kg_plot", "Variety")$test

## -------------------------------------------------------------------------------------------------
fit <- design_anova(maize_nitrogen, "Yield_t_ha", "Nitrogen_kg_ha", block = "Block")
waller_duncan(fit, "Nitrogen_kg_ha")

## -------------------------------------------------------------------------------------------------
head(blight_progress)
a <- audpc_by_unit(blight_progress, "Severity_pct", "Day", c("Block", "Treatment"))
head(a)
fa <- design_anova(a, "audps", "Treatment", block = "Block")
compare_means(fa, "Treatment")

## -------------------------------------------------------------------------------------------------
sm <- smith_index(uniformity_trial, cost_ratio = 2)
sm
plot(sm)

## ----include = FALSE----------------------------------------------------------
options(old_options)

