> a = as.factor(c("A", "B", "A", "C"))
> b = as.integer(factor(a))
Well, probably basic to many, it was new to me :)
Now, wondering if it is equally easy to convert it into a multi-column matrix where each column indicates class membership (thus, resulting in three columns for the above...). That's another trick I need to learn...