View source: R/list_comparison_linter.R
list_comparison_linter | R Documentation |
Usage like lapply(x, sum) > 10
is awkward because the list must first
be coerced to a vector for comparison. A function like vapply()
should be preferred.
list_comparison_linter()
best_practices, common_mistakes
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "lapply(x, sum) > 10",
linters = list_comparison_linter()
)
# okay
lint(
text = "unlist(lapply(x, sum)) > 10",
linters = list_comparison_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.