| extract_ptype | R Documentation |
extract_ptype() extracts a tibble with 0 rows from data. This contains
all of the required information about column names, classes, and factor
levels that are required to check the structure of new data at prediction
time.
extract_ptype(data, ..., call = current_env())
data |
A data frame or matrix. |
... |
These dots are for future extensions and must be empty. |
call |
The call used for errors and warnings. |
extract_ptype() is useful when creating a new preprocessing blueprint. It
extracts the required information that will be used by the validation checks
at prediction time.
A 0 row slice of data after converting it to a tibble.
hardhat:::extract_ptype(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.