Description Usage Arguments Value See Also Examples
Find a string in a character vector.
1 |
pattern |
Character scalar, string to be matched in |
x |
Character vector where matches are sought. |
ignore.case |
Logical scalar, indicating case sensitivity, default TRUE. |
value |
Logical scalar, indicating whether to return the matching elements (the default, TRUE) or their indices (FALSE). |
fixed |
Logical scalar, indicating whether string should be matched as is, default TRUE. |
... |
Other arguments to |
Character vector containing the matching elements of x
.
grep
.
1 2 3 4 5 6 7 8 | txt <- c("The", "licenses", "for", "most", "software", "are", "designed",
"to", "take", "away", "your", "freedom", "to", "share", "and", "change",
"it.", "", "By", "contrast,", "the", "GNU", "General", "Public", "License",
"is", "intended", "to", "guarantee", "your", "freedom", "to", "share", "and",
"change", "free", "software", "--", "to", "make", "sure", "the", "software",
"is", "free", "for", "all", "its", "users.")
stringin("b", txt)
stringin("ar", txt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.