Skip to contents

This function standardizes diatoms code.

Usage

clean_diatom_code(code, keep_non_matches = TRUE)

Arguments

code

a character vector of abbreviations

keep_non_matches

If TRUE (the default) an element of code that can't be matched to any of the internal mapping vectors will be kept as is. Otherwise it will be replaced with NA.

Value

A character vector with the length of code and cleaned the diatoms code if they are included in diatom_code_abbr_mapping. Non matches may be replaced with NA (depending on the value of keep_non_matches).