recompose | R Documentation |
recompose()
takes a data frame and converts it into one of:
A tibble
A data frame
A matrix
A sparse matrix (using the Matrix package)
This is an internal function used only by hardhat and recipes.
recompose(data, ..., composition = "tibble", call = caller_env())
data |
A data frame. |
... |
These dots are for future extensions and must be empty. |
composition |
One of:
|
call |
The call used for errors and warnings. |
The output type is determined from the composition
.
df <- vctrs::data_frame(x = 1)
recompose(df)
recompose(df, composition = "matrix")
# All columns must be numeric to convert to a matrix
df <- vctrs::data_frame(x = 1, y = "a")
try(recompose(df, composition = "matrix"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.