View source: R/split.dataset.R View source: R/.ipynb_checkpoints/split.dataset-checkpoint.R
split.dataset | R Documentation |
Split a dataset into a design (X) matrix and labels (Y), and one-hot encodes factors. Does not need to be called by the user.
## S3 method for class 'dataset' split(formula, data)
formula |
An object of class 'formula' describing the model to be fit, to determine X and Y. |
data |
A 'data.frame' containing the dataset to be split. |
A list containing the design matrix (X), and the Y values (one-hot encoded as necessary). If Y is a factor, then raw.Y is still factors, and levels contains the levels that the factor can take.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.