Unneeded concatenation linter
Source:R/unneeded_concatenation_linter.R
unneeded_concatenation_linter.Rd
Check that the c()
function is not used without arguments nor with a single constant.
Arguments
- allow_single_expression
Logical, default
TRUE
. IfFALSE
, one-expression usages ofc()
are always linted, e.g.c(x)
andc(matrix(...))
. In some such cases,c()
is being used for its side-effect of stripping non-name attributes; it is usually preferable to useas.vector()
to accomplish the same more readably.
See also
linters for a complete list of linters available in lintr.