My 1st blog on the #rstats "R Blog": Not for the faint of the heart, and related to have future R 4.0.0 be slightly more internally consistent: A matrix should be a (2d) array, shouldn't it?
And I also found the link below helpful, with a nice summary of the issue and what to do instead of class(.)==