This function calculates the fraction present in the crop rotation

calc_rotation_fraction(ID, B_LU_BRP, crop)

Arguments

ID

(numeric) The ID of the field

B_LU_BRP

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

crop

(character) The crop to check for. For relevant crop categories, see details.

Value

The fraction of specific crop types within the crop rotation sequence. A numeric value.

Details

This function calculates the fraction present in the crop rotation for specific crop categories. These categories include "starch", "potato", "sugarbeet", "grass", "mais", "alfalfa","catchcrop","cereal","clover",'nature', rapeseed',"other","rustgewas",and "rustgewasdiep".

Examples

calc_rotation_fraction(ID = rep(1,4), B_LU_BRP = c(265,1910,1935,1033),crop = 'potato')
#> [1] 0.25 0.25 0.25 0.25
calc_rotation_fraction(ID = rep(1,4), B_LU_BRP = c(265,1910,1935,1033),crop = 'grass')
#> [1] 0.25 0.25 0.25 0.25