[eCow] Correctif environnement

This commit is contained in:
2026-09-02 18:10:10 +02:00
parent feb04a555a
commit a3363fff11
3 changed files with 12 additions and 13 deletions
+3 -6
View File
@@ -49,7 +49,7 @@ calcul_ecow_by_chep <- function(cheptel, step = 3) {
by = c("pereGenetique" = "anim")
)
# Récupère les produits ajout des données manquantes
produits_cheptel <- add_data_ecow(cheptel_ecow$produits, cheptel_ecow$nomsparents, czhbc)
produits_cheptel <- add_data_ecow(cheptel_ecow$produits, cheptel, cheptel_ecow$nomsparents, czhbc)
###################################################################################################################
@@ -71,9 +71,6 @@ calcul_ecow_by_chep <- function(cheptel, step = 3) {
prod_vaches_corr <- apply_effet_chep(produits_vaches, effets$effets_chep, effets$rapport_MF)
# On récupère les coefficients de pondération pour les pointages au sevrage
pps <- params_ponderation$pointage$sevrage
# Ajout à la table vache des informations synthétisées de leur veaux
synth_brute_vaches <- get_synth_prod_parent(vaches, prod_vaches_corr, params_ponderation)
@@ -133,7 +130,7 @@ calcul_ecow_by_chep <- function(cheptel, step = 3) {
filter(sexe == 2)
# Petits produits issus des filles des taureaux nés dans le cheptel
pprod_filles_taureaux <- add_data_ecow(cheptel_ecow$petits_produits, cheptel_ecow$nomsparents, czhbc)
pprod_filles_taureaux <- add_data_ecow(cheptel_ecow$petits_produits, cheptel, cheptel_ecow$nomsparents, czhbc)
# Calcul de la synthèse par fille de leur produits
synth_filles_taureaux <- get_synth_prod_parent(filles_taureaux, pprod_filles_taureaux, params_ponderation)
@@ -189,7 +186,7 @@ calcul_ecow_by_chep <- function(cheptel, step = 3) {
###################################################################################################################
message("Début partie Lignées")
fondatrices <- cheptel_ecow$fondatrices
descendants <- add_data_ecow(cheptel_ecow$descendants, cheptel_ecow$nomsparents, czhbc)
descendants <- add_data_ecow(cheptel_ecow$descendants, cheptel, cheptel_ecow$nomsparents, czhbc)
vaches_lignees <- descendants %>% filter(anim %in% descendants$mereGenetique)
produits_lignees <- descendants %>% filter(mereGenetique %in% vaches_lignees$anim)