[R] What is "assign" attribute?

rkevinburton at charter.net rkevinburton at charter.net
Thu Feb 25 09:54:16 CET 2010


I am just curious. Every once and a while I see an attribute attached to an object called "assign". What meaning does this have? For example:

dist ~ speed, data=cars

forms a matrix like:

 num [1:50, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:50] "1" "2" "3" "4" ...
  ..$ : chr [1:2] "(Intercept)" "speed"
 - attr(*, "assign")= int [1:2] 0 1

The "dimnames" attribute is fairly self-explanatory. I just am not sure what the "assign" attribute means.

Thank you.

Kevin



More information about the R-help mailing list