which_grepl_linter | R Documentation |
which(grepl(pattern, x))
is the same as grep(pattern, x)
, but harder
to read and requires two passes over the vector.
which_grepl_linter()
consistency, efficiency, readability, regex
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "which(grepl('^a', x))",
linters = which_grepl_linter()
)
# okay
lint(
text = "which(grepl('^a', x) | grepl('^b', x))",
linters = which_grepl_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.