The problem is that in your model you have several covariances. plot() will start automatically only if your data= argument has exactly three columns (one of which is the answer). For example, on the help page ?plot.svm you can call
data(cats, package = "MASS") m1 <- svm(Sex~., data = cats) plot(m1, cats)
So, since you can only show two dimensions on a graph, you need to specify what you want to use for x and y when you have several choices from
cplus<-cats cplus$Oth<-rnorm(nrow(cplus)) m2 <- svm(Sex~., data = cplus) plot(m2, cplus)
So why are you getting the "Missing Formula" error.
There is another catch. plot.svm will only display continuous variables along the x and y axes. Contact lens data.fra data have only categorical variables. The plot.svm function simply does not support this, as far as I can tell. You will need to decide how you want to summarize this information in your own visualization.
Mrflick
source share