A special attribute known as the class of the object is used to allow for an object oriented style of programming in ..
For example if an object has class data.frame, it will be printed in a certain way, the plot() function will display it graphically in a certain way, and other generic functions such as summary() will react to it as an argument in a way sensitive to its class.
To remove temporarily the effects of class, use the function unclass(). For example if winter has the class data.frame then
winter
will print it in data frame form, which is rather like a matrix, whereas
unclass(winter)
will print it as an ordinary list. Only in rather special situations do you need to use this facility, but one is when you are learning to come to terms with the idea of class and generic functions.
Generic functions and classes will be discussed further in §
,
but only briefly.