[R] attr function

Shawn Way sway at tanox.com
Wed Feb 5 14:36:02 CET 2003


I've been trying unsuccessfully to extract the term labels from a model
frame using the attr function.

The code is as follows

a <- data.frame(col1=c(1,2,3,2,1,3),col2=c(2,4,7,6,4,3))
b <- model.frame(col2~col1,data=a)

Now the term.labels attribute is col1, but how do I get this from the b data
frame attributes?

Thanks in advance...


Shawn Way




More information about the R-help mailing list