Resolve a ccp (crop calendar period) string with whitespace and dash normalisation
Source: R/crop_lookup.R
resolve_ccp.RdHandles common variations between user input and the canonical English
value stored in coef_time$ccp:
Trims outer whitespace and collapses internal multiple spaces.
Replaces en-dash (U+2013) and em-dash (U+2014) with hyphen.
Case-insensitive match.
Usage
resolve_ccp(x, table = NFert::coef_time)Arguments
- x
Character. The
ccpstring to resolve.- table
Lookup with column
ccp; defaultNFert::coef_time.