powered by
testthat::expect_length() exists specifically for testing the length() of an object. testthat::expect_equal() can also be used for such tests, but it is better to use the tailored function instead.
testthat::expect_length()
length()
testthat::expect_equal()
expect_length_linter()
best_practices, package_development, readability
linters for a complete list of linters available in lintr.