Learn R Programming

OBIC (version 4.2.3)

calc_rotation_fraction: Calculates the fraction in the crop rotation

Description

This function calculates the fraction present in the crop rotation

Usage

calc_rotation_fraction(ID, B_LU_BRP, crop)

Value

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

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.

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

Run this code
calc_rotation_fraction(ID = rep(1,4), B_LU_BRP = c(265,1910,1935,1033),crop = 'potato')
calc_rotation_fraction(ID = rep(1,4), B_LU_BRP = c(265,1910,1935,1033),crop = 'grass')

Run the code above in your browser using DataLab