Converts yields from a cropping system to a common crop-equivalent yield based on economic value.

system_productivity_index(yields, prices, base_price, verbose = TRUE)

Arguments

yields

Numeric vector. Yields of individual crops in the system (kg/ha).

prices

Numeric vector. Market prices of individual crops (currency/kg). Must be the same length as yields.

base_price

Numeric. Price of the base or reference crop (currency/kg).

verbose

Logical. If TRUE, prints informational messages. Default TRUE.

Value

Numeric. System productivity expressed as base crop equivalent yield (kg/ha).

Details

$$SPI = \frac{\sum(Y_i \times P_i)}{P_{base}}$$

Examples

system_productivity_index(yields = c(5000, 4500),
                          prices = c(22, 25), base_price = 25)
#> SPI computed: 8900 kg/ha base equivalent.
#> [1] 8900