The stats package contains the glm function for classification using logistic regression.
Classifying using logistic regression
Getting ready
If you have not already installed the caret package, install it now. Download the data files for this chapter from the book's website and place the boston-housing-logistic.csv file in your R working directory. We will use CLASS as our target or outcome variable and all the remaining variables as predictors. Our outcome variable has values of 0 or 1, with 0 representing neighborhoods with Low median home values and 1 representing neighborhoods with High median home values. Logistic regression requires all the independent/predictor variables to be numeric and the dependent variable...