Error :: requires numeric/complex matrix/vector arguments
An Introduction to R : about the difference between a matrix and data.frame.
matrix 곱을 할때, data.frame이라면 matrix로 변환이 필요하다.
class(A_deviation) A_covariance <- 1/(n-1) * t(A_deviation) %*% A_deviation
[1] "data.frame" Error in t(A_deviation) %*% A_deviation : requires numeric/complex matrix/vector arguments
A_covariance <- 1/(n-1) * t(A_deviation) %*% as.matrix(A_deviation)