ma=diag(3)+t(da)%*%da
R Code above, error message as follows:
Error in t(da) %*% da : requires numeric/complex matrix/vector argume
See also this solution: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16607
I couldn't figure out what was wrong with combat, so I tried to run PCA (function prcomp) on my dataset. R kept telling me that the input is not a matrix, even though when checking the class of the input object, it did say 'matrix' and mode 'numeric'. After restarting my IDE (Architect in my case), everything was running fine with combat and with PCA.