powered by
Expectation: does a vector have the specified length?
expect_length(object, n)
Object to test.
Supports limited unquoting to make it easier to generate readable failures within a function or for loop. See quasi_label for more details.
Expected length.
Other expectations: comparison-expectations, equality-expectations, expect_error, expect_match, expect_message, expect_named, expect_null, expect_output, expect_silent, inheritance-expectations, logical-expectations
comparison-expectations
equality-expectations
expect_error
expect_match
expect_message
expect_named
expect_null
expect_output
expect_silent
inheritance-expectations
logical-expectations
# NOT RUN { expect_length(1, 1) expect_length(1:10, 10) # } # NOT RUN { expect_length(1:10, 1) # }
Run the code above in your browser using DataLab