The current functions that accept a matrix should also allow a data.frame and just coerce it to matrix.