[R] coercing "numeric" components of data frame to "factor" or "ordered"?
Russell Senior
seniorr at aracnet.com
Thu May 2 23:45:16 CEST 2002
I am getting ready to load a bunch of data into R. The data is all
numeric, but some of the numbers are integer codes representing
non-numeric semantics. What is the best way to "fix" the data frames
so that these compenents are recognized as "factors" or "ordered", as
appropriate?
Can I "assign" to some attribute of the data frame component, like the
"class" or "levels" to get the desired effect?
Thanks!
--
Russell Senior ``The two chiefs turned to each other.
seniorr at aracnet.com Bellison uncorked a flood of horrible
profanity, which, translated meant, `This is
extremely unusual.' ''
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list