validate_regex_key_pair: Check a regex-key pair

View source: R/old_taxa--taxmap--parsers.R

validate_regex_key_pairR Documentation

Check a regex-key pair

Description

Checks that the number of capture groups in the regex matches the length of the key. Checks that only certain values of key can appear more that once. Adds names to keys that will be used for column names in the output of extract_taxonomy. Uses non-standard evaluation to get the name of input variables.

Usage

validate_regex_key_pair(regex, key, multiple_allowed)

Arguments

regex

(character) A regex with capture groups

key

(character) A key corresponding to regex

multiple_allowed

(character) Values of key_options that can appear more than once.

Value

Returns the result of match.arg on the key.


metacoder documentation built on April 4, 2023, 9:08 a.m.