regex_match {kim} | R Documentation |
Regular expression matches
Description
Returns elements of a character vector that match the given regular expression
Usage
regex_match(regex = NULL, vector = NULL, silent = FALSE, perl = FALSE)
Arguments
regex |
a regular expression provided, a default theme will be used. |
vector |
a character vector in which to search for regular expression matches, or a data table whose column names will be searched |
silent |
logical. If |
perl |
logical. Should Perl-compatible regexps be used? |
Examples
regex_match("p$", names(mtcars))
colnames_ending_with_p <- regex_match("p$", names(mtcars))
[Package kim version 0.5.422 Index]