From e7ab486126074faadc2606813c3224e9d57a771f Mon Sep 17 00:00:00 2001 From: yuki-nmi Date: Tue, 22 Oct 2019 16:47:16 +0200 Subject: [PATCH 1/3] Several suggestions for management evaluation --- R/management.R | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/R/management.R b/R/management.R index 5c27c778..c923bf12 100644 --- a/R/management.R +++ b/R/management.R @@ -94,7 +94,8 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT, dt.arable = dt[crop_n == 'akkerbouw'] # measure 1. is the parcel for 80% of the year grown by a crop (add 3 points) - dt.arable[M_M10==TRUE, value := value + 3] + #dt.arable[M_M10==TRUE, value := value + 3] + dt.arable[D_CP_RUST > 0.60, value := value + 3] #Calculate from fraction rustgewassen (suggestion of Wim) # measure 2. is minimal 40% of the deep rooting crops (add one point) dt.arable[D_CP_RUST > 0.4, value := value + 1] @@ -103,6 +104,10 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT, # measure 3. crop rotation of potato is at minimum 1:4 (add two points) dt.arable[D_CP_POTATO > 0.15 & D_CP_POTATO <= 0.25, value := value + 2] + # Here one measure is missing, compared to the table of Van der Wal et al.: + # Gebruik van technieken die hoeveelheid gewasbeschermingsmiddelen reduceren + # Do we need to include one more M_ variable for this measurement? + # measure 4. use of early varieties in relevant cultures to avoid harvesting after september (stimulating catch crop too) dt.arable[grepl('mais|aardappel|bieten, suiker',crop_name) & M_M11==TRUE, value := value + 1] @@ -121,6 +126,10 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT, # measure 9. is heavy machinery avoided by slurry application dt.arable[soiltype.n !='veen' & M_M12==TRUE, value := value + 1] + # measure 6(?). are catchcrops sown after main crop + # In Van der Wal et al 2016: Gebruik vanggewassen na maïsoogst (alleen klei, zand en löss al verplicht) + dt.arable[grepl('mais',crop_name) & soiltype.n =='klei' & M_M6 == TRUE, value := value + 1] + # negative scores may not occur dt.arable[value < 0, value := 0] From 9dcd497cda816ddda7bbe08b30b83b6f55f229ff Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 31 Oct 2019 19:23:20 +0100 Subject: [PATCH 2/3] update news --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index dcfa9001..8c004d77 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,7 @@ * Update of crumbeability groups in `crops.obic` * Maximum value of A_MN_CC is increased from 30000 to 250000 * The code for evaluating in `ind_crumbeability` is simplified +* M_M10 user input changed in D_CP_RUST input, plus comments added #29 ### Fixed * Preprocessing, indicators and scores make use of internal copy of the table now rather than referencing to an object outside the scope of the function From 5217ab1e8d8df200cb1939446c37712db4186d84 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 31 Oct 2019 19:27:12 +0100 Subject: [PATCH 3/3] small textual change --- R/management.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/management.R b/R/management.R index c923bf12..d02eec84 100644 --- a/R/management.R +++ b/R/management.R @@ -94,8 +94,8 @@ calc_management <- function(A_OS_GV,B_LU_BRP, B_BT_AK,B_GT, dt.arable = dt[crop_n == 'akkerbouw'] # measure 1. is the parcel for 80% of the year grown by a crop (add 3 points) - #dt.arable[M_M10==TRUE, value := value + 3] - dt.arable[D_CP_RUST > 0.60, value := value + 3] #Calculate from fraction rustgewassen (suggestion of Wim) + # calculate from fraction rustgewassen (suggestion of Wim) + dt.arable[D_CP_RUST > 0.60, value := value + 3] # measure 2. is minimal 40% of the deep rooting crops (add one point) dt.arable[D_CP_RUST > 0.4, value := value + 1]