Logical vector, TRUE for items that match pattern.
Arguments
vector
Either a character or a factor vector.
pattern
Pattern to be matched
ignore.case
logical; is pattern case-sensitive?
fixed
logical; should pattern be interpreted as a literal string (i.e., ignoring regular expressions)?
perl
logical; is pattern Perl-compatible regular expression?
Details
Internally, like is essentially a wrapper around base::grepl, except that it is smarter about handling factor input (base::grep uses slow as.character conversion).