Learn R Programming

SoilManageR (version 1.0.1)

check_management_df: Check management_df for consitency

Description

The function checkes objects of the class management_df() for internal consistency. It formally checks the class and the column names. Additionally, the function checks if dates are consistently increasing and if all organic amendments, tillage and sowing devices and crops are in the relevant look-up-tables. Furthermore, the amount of organic amendments (<100t/ha) and N fertilizer (<100kgN/ha) application rates per event are checked. The depth of tillage operations are compared with the min and max depth from the STIR_value_LUT. Finally, the order of tillage, sowing and harvest operations are checked for plausibility (see details for more information).

Usage

check_management_df(var_MGMT_data)

Value

a test_report list (only returned if some tests failed)

Arguments

var_MGMT_data

an object of the management_df() class

Details

The order of tillage, sowing and harvest operations are checked with the following assumptions:

  • after "stubble_cultivation" the following operations are allowed: "stubble_cultivation", "primary_tillage", "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

  • after "primary_tillage" the following operations are allowed: "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

  • after "seedbed_preparation" the following operations are allowed: "stubble_cultivation", "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

  • after "sowing_main_crop" the following operations are allowed: "sowing_main_crop", "harvest_main_crop"

  • after "sowing_cover_crop" the following operations are allowed: "stubble_cultivation", "primary_tillage", "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

  • after "harvest_main_crop" the following operations are allowed: "harvest_main_crop", "straw_removal", "stubble_cultivation", "primary_tillage", "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

  • after "straw_removal" the following operations are allowed: "harvest_main_crop", "straw_removal", "stubble_cultivation", "primary_tillage", "seedbed_preparation", "sowing_main_crop", "sowing_cover_crop"

Additionally, there are exceptions for potato crops: "bedder" can be used after a "potato_planter" and "mulching" can be applied before a "potato_harvester"

See Also

  • management_df() for creating an management_df

  • management_df_from_excel() for importing a management_df from an excel template

Examples

Run this code
#example input
check_management_df(EXAMPLE_data)

Run the code above in your browser using DataLab