I'm having some trouble writing some code that dispatches on matrices. To assist me, I'd like to see what generic functions in the base library dispatch on matrices. Is there any way to get R to give me a list of them? Failing that, does anyone know of any members of that list?
There are at least seven functions in base R that have matrix generics:
anyDuplicated
determinant
duplicated
isSymmetric
subset
summary
unique
you can get them with
getS3method("anyDuplicated", class="matrix")
or just
anyDuplicated.matrix
Found using
Filter(function(x) {
!is.null(getS3method(x, class="matrix", optional=TRUE))
},ls(all.names=TRUE, env = baseenv()))