Resolve a crop name (Italian or English) to its canonical entry
Source:R/crop_lookup.R
resolve_crop.RdNFert reference tables (uptake_table, mas.table, crops.table,
standard_pk_doses.table) carry the canonical English crop names in
the column crop (since NFert 0.12.0), with the Italian translation
in crop_it and a duplicate of the English name in crop_en for
backward compatibility. This helper accepts any of the three forms
(case-insensitive, whitespace-normalised, exact match) and returns
the canonical English key used for joins downstream.
Usage
resolve_crop(x, table = NFert::uptake_table)Arguments
- x
Character. Crop name in Italian or English.
- table
Lookup table; default
NFert::uptake_table.