[R] Plot error

David Meyer david.meyer at wu-wien.ac.at
Sun Jan 6 10:12:57 CET 2008


Pedros:

if you have more than two explanatory variables, the plot.svm() function 
plots a slice out of the input space, i.e., you have to specify the two 
variables that are plot on the x and y axis. The example on the help 
page tells you how:

plot(model, data= dados[,-1], formula=dados[,2]~dados[,3])

should work, choosing all other coordinates except the 2nd and 3rd to be 
0 (default).

Best
David

------------------

 > I'm trying to plot an svm model and I'm the following error:
 > >
 >> > > plot(model, data= dados[,-1], formula=formula(dados[,2]~dados[,
 > > 3]),svSymbol = 1, dataSymbol = 2, symbolPalette = rainbow(4),color.
 > > palette = terrain.colors)
 > > Error in terms.default(x) : no terms component
 > >
 > > Anyone knows how to solve this???




More information about the R-help mailing list