You forgot to put the comma after "-intrain" in the following assignment:
testing <- spam[-intrain, ]
"make" is one of the data columns of spam dataset.
> colnames(spam)
[1] "make"
--
GG
[[alternative HTML version deleted]]
__
R-help@r-pro
using R 3.2.3 on windows.
> library(caret); library(kernlab);data(spam)
> intrain <- createDataPartition(y=spam$type, p=0.75, list=FALSE)> training <-
> spam[intrain,]
> testing <- spam[-intrain]> set.seed(32343)> modelFit <- train(type
> ~.,data=training, method="glm")
> modelFit> modelFit$final
2 matches
Mail list logo