[R] Question in using e1071 svm routine

Joshua Wiley jwiley.psych at gmail.com
Wed Nov 10 03:05:52 CET 2010

On Tue, Nov 9, 2010 at 11:18 AM, nathan.kupp <nathan.kupp at yale.edu> wrote:
> R, by default, has some of the most cryptic error / debug messages ever
> invented.

I nominate the html 404 error for that.

> The error message encountered by the two posters:
> Error in if (any(co)) { : missing value where TRUE/FALSE needed
> In addition: Warning message:
> In FUN(newX[, i], ...) : NAs introduced by coercion
> results from the inclusion of a factor variable in the x data frame passed
> to the svm(x,y) call. I've mistakenly done this many times; the text of the
> error message gives no indication that this is the source of the problem.

Passing data to a function without knowing its str()ucture is like
going into surgery without knowing which leg should be
amputated---it's polite if your surgeon knows, but I'd never rely on

> Removing the factor(s) from x will eliminate the error.
> Nathan Kupp
> Ph.D. Candidate
> Department of Electrical Engineering
> Yale University
> --
> View this message in context: http://r.789695.n4.nabble.com/Question-in-using-e1071-svm-routine-tp896541p3034950.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org 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.

Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles

More information about the R-help mailing list