Creates or validates a subclass of a tibble. These function is mostly useful for package authors that implement subclasses of a tibble, like sf or tsibble.
new_tibble() creates a new object as a subclass of
This function is optimized for performance, checks are reduced to a minimum.
validate_tibble() checks a tibble for internal consistency.
Correct behavior can be guaranteed only if this function
runs without raising an error.
1 2 3
A tibble-like object
Passed on to
The number of rows, required
Subclasses to assign to the new object, default: none
Deprecated, retained for compatibility. Please use the
x must be a list.
... argument allows adding more attributes to the subclass.
nrow argument is required.
This should be an integer of length 1,
and every element of the list
x should have
equal to this value.
(But this is not checked by the constructor).
This takes the place of the "row.names" attribute in a data frame.
x must have names (or be empty),
but the names are not checked for correctness.
validate_tibble() checks for "minimal" names
and that all columns are vectors, data frames or matrices.
It also makes sure that all columns have the same length,
NROW() is consistent with the data.
1d arrays are not supported.
1 2 3 4 5 6 7 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.