Learn R Programming

metacoder (version 0.3.7)

validate_regex_key_pair: 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)

Value

Returns the result of match.arg on the key.

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.