Extended case study: an S4 “Annotated Matrix” class

Why bother?



'Is a' versus 'has a'

Starting our class definition

A simple method: accessors (“getters”)

A simple method: dim and dimnames

A simple method: show

A more complicated method: updating ('replacement', 'setter') methods

A more complicated operation: validity

A more complicated method: subsetting

What else have we agreed to in the matrix API?