Clean Matching Fields in a Data Frame
clean_matching_fields.RdCreates cleaned versions of boat identifiers for fuzzy matching. Removes boat_name when it duplicates the registration_number.
Value
Data frame with three additional columns: registration_number_clean, boat_name_clean, fisher_name_clean
Details
The function performs the following operations:
Cleans registration_number using
clean_registration()Cleans boat_name and fisher_name using
clean_text()Sets boat_name_clean to NA when it matches registration_number_clean (to avoid double-counting the same information)