From 35db208a296896599ab1878465a0e9fc1a4b4c37 Mon Sep 17 00:00:00 2001 From: Ohinz998 Date: Wed, 22 Jan 2025 15:20:47 +0000 Subject: [PATCH] Adjusting estimation on rabbit feed use --- R/08_2_use_feed.R | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/R/08_2_use_feed.R b/R/08_2_use_feed.R index f8a5b35..cabfcc7 100644 --- a/R/08_2_use_feed.R +++ b/R/08_2_use_feed.R @@ -365,16 +365,11 @@ feed_req[, `:=`( cakes_f = ifelse(is.na(cakes_f), mean(cakes_f, na.rm = TRUE), cakes_f), scavenging_f = ifelse(is.na(scavenging_f), mean(scavenging_f, na.rm = TRUE), scavenging_f))] # This simple procedure assumes equal feed composition for -# Horses, Asses, Mules, Camels, Camelids, other -feed_req[item_code != 0 & !proc %in% c("Rabbits husbandry", "Rodents husbandry, other"), +# Horses, Asses, Mules, Camels, Camelids, other, "Rabbits husbandry", "Rodents husbandry, other" +feed_req[item_code != 0, `:=`(animals = total * animals_f, crops = total * crops_f, grass = total * grass_f, fodder = total * fodder_f, cakes = total * cakes_f, scavenging = total * scavenging_f)] -# Rabbits and hares, Rodents, other -feed_req[item_code != 0 & proc %in% c("Rabbits husbandry", "Rodents husbandry, other"), - `:=`(animals = total * animals_f, crops = total * (crops_f + grass_f), - grass = 0, fodder = total * fodder_f, cakes = total * cakes_f, - scavenging = total * scavenging_f)] # Kick factors again feed_req[, `:=`(animals_f = NULL, crops_f = NULL, grass_f = NULL,