This function is used to check whether something is a logical. You can use
this function to check the length of a logical vector. You can also specify
the level of a violation. If level is set to "warn" then invalid inputs will
warn you. However, if level is set to "error" then invalid inputs will abort.
# Define a dataclass for testing logicals:my_dataclass <-
dataclass(
bool = lgl_vec()
)
# `bool` must be a logical vector of any length!my_dataclass(
bool = TRUE)