df_like: Validator: Check if element is a data like object
Description
This function is used to check whether something is data like. You can use
this function to check the data row count. 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 data:my_dataclass <-
dataclass(
df = df_like(100)
)
# `df` must be a data like object with at most 100 rows!my_dataclass(
df = mtcars
)