Noah Silverman wrote:
That makes sense.

I my data is already nominal, I need to "expand" a single column into several binary ones.

Is there an easy function to do this in R, or do I need to create something from scratch? (If I have to create my own, any suggestions?)

Thanks!

-N
Hi Noah,

read up on the "contrasts" and the "model.matrix" functions.

Although if you use the kernlab package for SVMs, factors get treated in this way by default, you just need to use the formula interface.

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