R/apply_fertilisation_n.R
apply_fertilisation_n.RdUpdates the [Factors].Permutation.Fertilisation factor in an APSIM Next
Generation model. If a measured fertilisation amount is supplied, that value
is used directly. Otherwise the default scenario sequence 0, 40, ..., 440 is applied. The function stores the resulting schedule under
is retained. Applied evidence is stored under
attr(x, "agrillm")$fertilisation_n.
apply_fertilisation_n(apsimx, fertilisation_n)APSIM model object as returned by rapsimng::read_apsimx().
List describing resolved fertilisation nitrogen input,
typically from resolve_fertilisation_nitrogen().
A modified APSIM model object with updated fertilisation scenarios.
if (FALSE) { # \dontrun{
apsimx_path <- system.file("examples", "wheat.apsimx", package = "agrillm")
apsimx <- rapsimng::read_apsimx(apsimx_path)
fert_n <- list(value = 80)
updated <- apply_fertilisation_n(apsimx, fert_n)
attr(updated, "agrillm")$fertilisation_n
} # }