Does code return a vector with (given) names?Source:
You can either check for the presence of names (leaving
blank), specific names (by supplying a vector of names), or absence of
expect_named( object, expected, ignore.order = FALSE, ignore.case = FALSE, info = NULL, label = NULL )
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.
Character vector of expected names. Leave missing to match any names. Use
NULLto check for absence of names.
TRUE, sorts names before comparing to ignore the effect of order.
TRUE, lowercases all names to ignore the effect of case.
Extra information to be included in the message. This argument is soft-deprecated and should not be used in new code. Instead see alternatives in quasi_label.
Used to customise failure messages. For expert use only.