Skip to content
Prev 39550 / 63421 Next

another import puzzle

On 03/26/2011 11:14 AM, Ben Bolker wrote:
It 'turns out' that base::summary is an S3 generic. Matrix creates an S4 
generic that is distinct from base::summary (e.g., so that the default 
behavior of summary isn't altered for packages that want to have nothing 
to do with Matrix). Dispatch needs to go through the generic. lme4 has 
methods on Matrix::summary, not on base::summary, so without the 
Matrix::summary generic your object never sees the summary method for 
lme4 objects.

So you need to Import: Matrix and importFrom(Matrix, summary).

Martin Morgan