gregexprind {miscset} | R Documentation |
Pattern Matching and Extraction
Description
Function to extract a certain index from gregexpr()
.
Usage
gregexprind(pattern, text, n, ...)
Arguments
pattern |
Character string containing a regular expression to be searched in |
text |
Character vector where the search is performed. |
n |
Numeric value or character string |
... |
Arguments passed to function |
Value
Numeric vector of length length(text)
.
Author(s)
Sven E. Templer
See Also
See gregexpr for further information on arguments.
See regex for the use of regular expressions.
Examples
#
gregexprind(c("a"),c("ababa","ab","xyz",NA), 1)
gregexprind(c("a"),c("ababa","ab","xyz",NA), 2)
gregexprind(c("a"),c("ababa","ab","xyz",NA), "last")
#
[Package miscset version 1.1.0 Index]