[R] Ordering in factors ...

About this list Date view Thread view Subject view Author view Attachment view

From: j.logsdon@lancaster.ac.uk
Date: Fri 28 Jun 2002 - 18:27:11 EST


Message-id: <Pine.LNX.4.10.10206280923040.29438-100000@mercury.quantex>

This is a trivial question probably buried in page 21 somewhere of An
Idiot's Guide to R.

In MASS(2) P26 for S-Plus you can write:

ordered(income)<-c("Lo","Mid","Hi")

but in R 1.5.0 you get the response to such an instruction:

Error: couldn't find function "ordered<-"

What's the fix to this? I have a series of models where the factors as
reported need re-ordering so that the glm reports the coefficients with
respect to the correct level. At the moment, while the solutions are
identical, I actually have to do some arithmetic to show this.

TIA

John

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:57:34 EST