Thank you. It has been that way for six years, so presumably it worked once ....

On Mon, 13 Dec 2004 [EMAIL PROTECTED] wrote:

Full_Name: Heather Turner
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (137.205.240.44)


labels.lm does not produce term labels for estimable terms as intended, e.g.
example(lm)
labels(lm.D9)
character(0)

The function code is as follows:
labels.lm
function (object, ...)
{
   tl <- attr(object$terms, "term.labels")
   asgn <- object$asgn[object$qr$pivot[1:object$rank]]
   tl[unique(asgn)]
}
<environment: namespace:base>

Replacing object$asgn with object$assign appears to solve the problem:
labels.lm2 <-
+ function (object, ...)
+ {
+     tl <- attr(object$terms, "term.labels")
+     asgn <- object$assign[object$qr$pivot[1:object$rank]]
+     tl[unique(asgn)]
+ }

labels.lm2(lm.D9)
[1] "group"

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



-- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to