length_levels_linter | R Documentation |
length(levels(x))
is the same as nlevels(x)
, but harder to read.
length_levels_linter()
best_practices, consistency, readability
linters for a complete list of linters available in lintr.
# will produce lints
lint(
text = "length(levels(x))",
linters = length_levels_linter()
)
# okay
lint(
text = "length(c(levels(x), levels(y)))",
linters = length_levels_linter()
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.