Re: [R] Error running predict

2015-12-22 Thread Giorgio Garziano
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

[R] Error running predict

2015-12-21 Thread topjetboy via R-help
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