View source: R/grepl.data.frame.R
grepl.data.frame | R Documentation |
The function helps to define which rows of an input data.frame contain a specific patter.
grepl.data.frame(
data.frame,
pattern,
ignore.case = FALSE,
perl = FALSE,
fixed = FALSE,
useBytes = FALSE
)
data.frame |
Input data.frame. |
pattern |
Character string containing a regular expression (or character string for |
ignore.case |
If |
perl |
Logical value to define if Perl-compatible regexps should be used. By default |
fixed |
Logical value to define if the pattern is a string to be matched as is. Overrides all conflicting arguments. By default |
useBytes |
Logical value to define if the matching is done byte-by-byte rather than character-by-character. By default |
It will be return a logic vector with an element per each row of the data.frame. The value is TRUE
when the patter is found at least once in the corresponding data.frame row.
iris = iris %>% filter(grepl.data.frame(iris, pattern = "setosa"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.