R-alpha: terms

Thomas Lumley thomas@biostat.washington.edu
Fri, 22 Aug 1997 09:45:44 -0700 (PDT)


Another minor incompatibility
R>attr(terms(y~x),"response")
[1] TRUE
S> attr(terms(y~x),"response")
[1] 1

In S the attribute indicates which column of the model frame will contain
the response. In R this always column 1 because model frames are only
useful when their columns are in the right order (model.matrix doesn't
check).


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-