Description Usage Arguments Details Note
View source: R/dataTransform.R
Convert dataset to a model matrix suitable for training in caret
1 | gatherData(grade, conn, DV = "grad_ind", na.omit = TRUE)
|
grade |
a numeric representing the grade level to extract data for |
conn |
a connection object suitable for extracting data |
DV |
a character representing the variable name of the dependent variable |
na.omit |
logical, should rows with an NA be omitted, default is TRUE |
First the function extracts data from buildTrainingPool, then it builds a model matrix out of the formula DV ~ ., first excluding all "KEY" variables which represent year, school, district, and student identifiers. Then it returns the model matrix.
Using na.omit=FALSE may result in a non-conformable array due to a mismatch between the DV vector length and data vector length. This function has not been modified to allow this yet.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.