gatherData: Convert dataset to a model matrix suitable for training in...

Description Usage Arguments Details Note

View source: R/dataTransform.R

Description

Convert dataset to a model matrix suitable for training in caret

Usage

1
gatherData(grade, conn, DV = "grad_ind", na.omit = TRUE)

Arguments

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

Details

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.

Note

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.


jknowles/ModelEWS documentation built on May 19, 2019, 11:42 a.m.