In the following function, I need to add a custom error message, when the dimension of the vector mu and the dimensions of the matrix sigma do not match.
This is the template for the function I want to use:
myfunction = function(mu,sigma) { return(mu %*% sigma) }
Anyone knows how to do that?