The examples in the book were run in 2001, using S-PLUS (as it says). The R package e1071 has changed since then, and hence the results it gives have changed. However, the S-PLUS version (which has not been updated) still gives the results in the book.
The `problem' is your expectation that R in 2006 is identical to S-PLUS in 2001. On Wed, 2 Aug 2006, G.C. McGuinness wrote: > Can anyone explain the root of my problem? > > When I type the following code into R, I receive 42 support > vectors insted of the 21 stated in the book 'Modern Applied > Statistics with S': > > library(MASS); > library(e1071); > library(class); > lcrabs <- log(crabs[,4:8]); > (svm(crabs$sp ~ ., data = lcrabs, cost = 100, gamma = 1)); > > By changing the value of gamma I can obtain only 21 support vectors, > but I not sure where an explanation to my problem can be found. I > use R 2.3.2 and the most recent version of the package 'e1071'. My goal > is to minimise the number of SVs for a separate data set. There is no `R 2.3.2'. > Many thanks, Graeme. > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.