StoXProject / RstoxFDA

Fisheries Dependent Analysis with Rstox
https://stoxproject.github.io/RstoxFDA
GNU Lesser General Public License v3.0
0 stars 1 forks source link

strict option to RstoxFDA::convertCodes #76

Closed edvinf closed 1 year ago

edvinf commented 1 year ago

A common usage of RstoxFDA::convertCodes is to apply non-complete conversion, where it is desired that the codes for which no conversion is defined are set to NA. Currently the function halts with an error if any codes in argument 'code' does not have a mapping defined in 'conversionTable'. Add an option 'strict' with default value True, which may be used to convert with incomplete mapping, leaving undefined codes as NA.