So this is an interesting gotcha in R (or at least I thought so). Suppose you have an object of class foo, where the “class” here is a class in the S3 sense. So you create a print method for the foo class, by writing a function print.foo. You create an object y, that has class foo. You pass that object to the print method. Read more »

