df_like | R Documentation |
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.
df_like(max_row = Inf, min_row = 1, level = "error")
max_row |
The maximum row count of a data element |
min_row |
The minimum row count of a data element |
level |
Setting "warn" throws a warning, setting "error" halts |
A function with the following properties:
Checks whether something is a data frame like object
Determines whether the check will throw warning or error
Optionally checks for row count
# 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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.