is_state | R Documentation |
Test an Object for States
is_state(x)
x |
A vector to be tested. |
An element-wise check of a supplied vector is carried out. To
test an entire vector and return a single boolean value, functions
such as base::all
or base::any
should be used.
A logical vector.of same length as the input. If the input object is
not even of type character
, return the object unaltered, with a
warning.
The function throws a warning, when a missing value is among the
elements. It works only for atomic vectors, throwing an error when this
is not the case or when NULL
is passed to it.
all(is_state(naijR::states()))
is_state(c("Maryland", "Baden-Baden", "Plateau", "Sussex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.