Skip to content
Prev 47398 / 63424 Next

class() on substitute(...) output?

On Jan 3, 2014, at 9:46 AM, Hadley Wickham <h.wickham at gmail.com> wrote:

            
Definitely not the former.  What happens is easy enough to see, if you follow the definition of the .Primitive.  Routine R_data_class in attrib.c does the computation.  When there is no class attribute, it supplies the definition for "matrix" and "array", turns the 3 types for functions into "function", and distinguishes among objects of type "language" to give specific classes to the syntactic functions called, such as `while`(),  `if`(), etc.

It does seem that the documentation should say something similar.

John