Noah Silverman wrote:
Thanks for all the suggestions.

My data was loaded in from a csv file with about 80 columns (3 of these columns are nominal) no specific settings for the nominal columns.

Currently, if I call svm (e1071), I get an error about the nominal column.

Do I need to tell R to change the column to a factor? i.e. foo$color <- factor(foo$color)

That might be a possible problem, but before you try something, simply investigate whats wrong now:

- do str(mydata) to check columntypes of you data.frame. if somethings wrong there for your 3 mentioned, do indeed use as.factor (or import yout data in a better way) - are you sure you use the formula interface for svm from e1071. If you check the help page, you will see that it clearly supports factors.

Otherwise paste str(mydata) and your call to svm here.

Bernd

______________________________________________
R-help@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.

Reply via email to