calc_grass_age {OBIC}R Documentation

Calculate the average age of the grass

Description

This function calculates the average age of the grass

Usage

calc_grass_age(ID, B_LU_BRP)

Arguments

ID

(numeric) The ID of the field

B_LU_BRP

(numeric) The crop code (gewascode) from the BRP

Details

The function assumes that the order of crop codes are descending, so the latest year is on top.

Value

The age of the grassland within a crop rotation plan. A numeric value.

Examples

calc_grass_age(ID = rep(1,5), B_LU_BRP = c(1091,265,256,256,1091))
calc_grass_age(ID = rep(1,5), B_LU_BRP = c(265,265,265,265,1091))


[Package OBIC version 3.0.2 Index]