Skip to contents

Observed yields and the fitted response curve(s) from nutrient_response, with the economic optimum dose marked.

Usage

plot_response(x, dose, yield, title = NULL)

Arguments

x

An object of class aridagri_response or aridagri_response_set.

dose, yield

The data used to fit the model.

title

Plot title.

Value

A ggplot2 object.

Examples

if (requireNamespace("ggplot2", quietly = TRUE)) {
  dose <- c(0, 20, 40, 60, 80, 100)
  yield <- c(1100, 1350, 1520, 1610, 1650, 1660)
  nr <- nutrient_response(dose, yield, model = "all", verbose = FALSE)
  plot_response(nr, dose, yield)
}