Grow a plant up to particular sizes.

grow_plant_to_size(plant, sizes, size_name, env, time_max = Inf,
  warn = TRUE, filter = FALSE)

grow_plant_to_height(plant, heights, env, ...)

Arguments

plant

A Plant object.

sizes

A vector of sizes to grow the plant to (increasing in size).

size_name

The name of the size variable within Plant$vars_phys (e.g., height).

env

An Environment object.

time_max

Time to run the ODE out for -- only exists to prevent an infinite loop (say, on an unreachable size).

warn

Warn if requesting a plant that is too large?

filter

Filter plants that are too large?

heights

Heights (when using grow_plant_to_height)

...

Additional parameters passed to grow_plant_to_size.

Value

A list with elements time (the time that a given size was reached), state (the ode state at these times, as a matrix) and plant a list of plants grown to the appropriate size. Note that if only a single size is given, a list of length 1 is returned.