Skip to contents

Wrapper for whether to search for an exact match or a partial match of a code in a vector of codes.

Usage

match_code(codes, code_vec, match_method = c("exact", "prefix"))

Arguments

codes

Vector of character string of code to search for

code_vec

Vector of character strings to compare against

match_method

A string, specifying the method for matching the codes

  • "exact" matches the provided code exactly.

  • "prefix" treats the provided code as a prefix for matching.

Value

Boolean for whether a match was found.