Passer au contenu

Checks that the file is a valid TopVigne CSV using check_topvigne_csv(), then renames and reshapes the data using a lookup table and standard rules.

Utilisation

standardise_topvigne_csv(
  filepath,
  lookup_table = c(Mildiou_Feuille = "PM_LEAF_PC", Mildiou_Grappe = "PM_BER_PC",
    Oidium_Grappe = "UN_BER_PC", Oidium_Feuille = "UN_LEAF_PC", Stade.phénologique =
    "bbch_stage", Stade.phenologique = "bbch_stage", `Stade phenologique` = "bbch_stage",
    Placette = "plot_id", Bloc = "block_code", Date = "observation_date", Code.essai =
    "experiment_id")
)

Arguments

filepath

Character. Path to the raw .csv file to standardize.

lookup_table

Named character vector. Mapping from original column names to standardized names.

Valeur de retour

A standardized data.frame with consistent column names and structure.