This is of the nature of an FAQ.  Data frames coerce character
vectors into factors.  If you want a character vector to stay
that way (and not become a factor) wrap in up in ``I()'':

        cat <- cbind(cat,Color=I(rainbow(nrow(cat))))

(There's no need to quote the name ``Color'' in the foregoing.)

                                cheers,

                                        Rolf Turner
                                        [EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to