![]() |
VOOZH | about |
pmatch() function in R Language is used to seek match for the pattern passed as argument. It returns the strings that begin with the pattern being searched.
Syntax: pmatch(pat, string, nomatch) Parameters: pat: pattern vector to be searched string: vector to be matched nomatch: return when no match is foundExample 1: Output:
[1] "Geeks" "Books" "geek" [1] 3 [1] 2Example 2: Output:
[1] "Geeks" "Books" "geek" [1] 1 2 -1