Matrix expression causes error “requires numeric/complex matrix/vector arguments”?

后端 未结 4 1932
时光说笑
时光说笑 2020-12-03 09:54
ma=diag(3)+t(da)%*%da

R Code above, error message as follows:

Error in t(da) %*% da : requires numeric/complex matrix/vector argume         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 10:42

    Just in addition, you get this error if you attempting to pass a data frame where a matrix should be.

提交回复
热议问题