[R] Question in using e1071 svm routine

David Winsemius dwinsemius at comcast.net
Wed Nov 10 02:12:29 CET 2010


On Nov 9, 2010, at 2:18 PM, nathan.kupp wrote:

>
> R, by default, has some of the most cryptic error / debug messages  
> ever
> invented. 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.

 > ?svm
No documentation for 'svm' in specified packages and libraries:
you could try '??svm'

So svm is not part of R core.

The inference is that the authors of svm built a package that did not  
provide informative error messages ... NOT that R is responsible.


> I've mistakenly done this many times; the text of the
> error message gives no indication that this is the source of the  
> problem.
> Removing the factor(s) from x will eliminate the error.

Instead of sending this message to a group of people who have no  
control over the process ... Why don't you take a more constructive  
path and suggest to the authors of svm that they test for invalid data  
being passed to the portion of the code that is throwing this error?  
Perhaps you could offer code since it appears you have examined the  
problem in more than

-- 
avid.

>
> Nathan Kupp
> Ph.D. Candidate
> Department of Electrical Engineering
> Yale University
> --



More information about the R-help mailing list