Description Usage Arguments Details Value Author(s) See Also Examples
Find which pattern matches x.
1 2 3 |
pattern |
a |
x |
a |
ignore.case, perl, value, fixed, useBytes, invert |
as for |
1. np <- length(pattern)
2. g. <- rep(NA, np)
3. for(i in seq(length=np)) g.[i] <- (length(grep(pattern[i], x))>0)
4. return(which(g.))
an integer
vector of indices
of elements of pattern
with a match
in x
.
Spencer Graves
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.