unneeded_concatenation_linter {lintr} | R Documentation |
Unneeded concatenation linter
Description
Check that the c()
function is not used without arguments nor with a single constant.
Usage
unneeded_concatenation_linter(allow_single_expression = TRUE)
Arguments
allow_single_expression |
Logical, default TRUE . If FALSE , one-expression
usages of c() are always linted, e.g. c(x) and c(matrix(...)) . In some such
cases, c() is being used for its side-effect of stripping non-name attributes;
it is usually preferable to use as.vector() to accomplish the same more readably.
|
Tags
configurable, efficiency, readability, style
See Also
linters for a complete list of linters available in lintr.
[Package
lintr version 3.0.0
Index]