[éCow] Correctifs et nettoyage
This commit is contained in:
@@ -100,7 +100,6 @@ maj_ecow_from_csv <- function() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
format_duration <- function(seconds) {
|
||||
h <- as.integer(seconds %/% 3600)
|
||||
m <- as.integer((seconds %% 3600) %/% 60)
|
||||
@@ -185,11 +184,11 @@ save_data_taureau <- function(taureaux, cheptel){
|
||||
filtered_taureaux <- taureaux %>%
|
||||
select(
|
||||
cheptel, pereGenetique, nom, dateNaiss, nomCheptelNaiss, nb_prod_in_chep, utilgen, prol, mort, txrepros, nbpp, txvf, pnm, pnf, p120m, p120f, p210m, p210f,
|
||||
dmsev, dssev, afsev, fillestot_nbavecprod, fillestot_pctavecprod, fillestot_isu, fillestot_age_sort, fillestot_agevel1, fillestot_ivv1, fillestot_ivv2p,
|
||||
dmsev, dssev, afsev, fillestot_nbavecprod, pctfilles_avecprod, fillestot_isu, fillestot_age_sort, fillestot_agevel1, fillestot_ivv1, fillestot_ivv2p,
|
||||
fillestot_vieprod, fillestot_dmad, fillestot_dsad, fillestot_afad, fillestot_nbprod, fillestot_txrepros, fillestot_nbpp, fillestot_prol, fillestot_mort,
|
||||
fillestot_txvf, fillesact_nbavecprod, pctfillesact_avecprod, fillesact_isu, fillesact_age_sort, fillesact_agevel1, fillesact_ivv1, fillesact_ivv2p,
|
||||
fillesact_vieprod, fillesact_dmad, fillesact_dsad, fillesact_afad, fillesact_nbprod, fillesact_txrepros, fillesact_nbpp, fillesact_prol, fillesact_mort,
|
||||
fillesact_txvf, nbfilles_renouv
|
||||
fillesact_txvf, nbfilles_renouv, fillestot_produits
|
||||
)
|
||||
|
||||
colnames(filtered_taureaux) <- c(
|
||||
@@ -198,7 +197,7 @@ save_data_taureau <- function(taureaux, cheptel){
|
||||
"vieprod_fillestot", "dmad_fillestot", "dsad_fillestot", "afad_fillestot", "nbprod_fillestot", "txrepros_fillestot", "nbpp_fillestot", "prol_fillestot", "mort_fillestot",
|
||||
"txvf_fillestot", "nbfillesact_avecprod", "pctfillesact_avecprod", "isu_fillesact", "age_sort_fillesact", "agevel1_fillesact", "ivv1_fillesact", "ivv2p_fillesact",
|
||||
"vieprod_fillesact", "dmad_fillesact", "dsad_fillesact", "afad_fillesact", "nbprod_fillesact", "txrepros_fillesact", "nbpp_fillesact", "prol_fillesact", "mort_fillesact",
|
||||
"txvf_fillesact", "nbfilles_renouv"
|
||||
"txvf_fillesact", "nbfilles_renouv", "produits"
|
||||
)
|
||||
|
||||
nb_lignes_supp <- delete_data_today(cheptel, "TAUREAUX")
|
||||
@@ -224,7 +223,7 @@ save_data_lignees <- function(lignees, cheptel){
|
||||
femtot_ivv2p, femtot_vieprod, femtot_dmad, femtot_dsad, femtot_afad, femtot_nbprod, femtot_txrepros, femtot_nbpp, femtot_prol,
|
||||
femtot_mort, femtot_txvf, femact_nbavecprod, pctfemact_avecprod, femact_isu, femact_age_sort, femact_agevel1, femact_ivv1,
|
||||
femact_ivv2p, femact_vieprod, femact_dmad, femact_dsad, femact_afad, femact_nbprod, femact_txrepros, femact_nbpp, femact_prol,
|
||||
femact_mort, femact_txvf, nbfilles_renouv
|
||||
femact_mort, femact_txvf, nbfilles_renouv, femtot_produits
|
||||
)
|
||||
|
||||
colnames(filtered_lignees) <- c(
|
||||
@@ -233,7 +232,7 @@ save_data_lignees <- function(lignees, cheptel){
|
||||
"ivv2p_femtot", "vieprod_femtot", "dmad_femtot", "dsad_femtot", "afad_femtot", "nbprod_femtot", "txrepros_femtot", "nbpp_femtot", "prol_femtot",
|
||||
"mort_femtot", "txvf_femtot", "nbfemact_avecprod", "pctfemact_avecprod", "isu_femact", "age_sort_femact", "agevel1_femact", "ivv1_femact",
|
||||
"ivv2p_femact", "vieprod_femact", "dmad_femact", "dsad_femact", "afad_femact", "nbprod_femact", "txrepros_femact", "nbpp_femact", "prol_femact",
|
||||
"mort_femact", "txvf_femact", "nbfem_renouv"
|
||||
"mort_femact", "txvf_femact", "nbfem_renouv", "produits"
|
||||
)
|
||||
|
||||
nb_lignes_supp <- delete_data_today(cheptel, "LIGNEES")
|
||||
|
||||
Reference in New Issue
Block a user