Skip to content
Prev 48730 / 63421 Next

listof

An interesting topic, but I'll only respond with my own experience,
and that is, while 'listof' could be usefully extended there was not
enough meat on the bones to want to do so. I think this is a limitation
of the S3 class/method structure, as I see it.

In several packages (effects, heplots, candisc, vcdExtra) I/we
deal with lists of objects of a given class, and want to define
methods for plot(), summary(), print(), etc.  In these cases, the
simplest solution was to designate a new class, e.g., 'efflist'
for a list of effects in a univariate lm/glm/polr/ ... model
or 'candiscList' for a list of candisc objects.  Methods for the
*list class could then use an apply() construct over the list
items.

Most recently,
in the effects package, we implemented some effects plot methods
for multivariate linear models. This is essentially a two-way collection
of effects for terms x responses, but how to represent this in the
class structure to re-use the existing code for a single effect
of a given response variable?

The solution used here was to define a new class, 'mlm.efflist', with 
new methods for this class.  This works within the current S3 class
scheme, but doesn't provide an extendible semantics.

-Michael
On 7/29/2014 11:20 PM, Adrian Baddeley wrote: