This is very strange: I want compute the following in R:
g = B/D * solve(A) where B and D are quadratics so they are just a scalar number, e.g. B=t(a) %*% F %*% a; I want to multiply B/D to A^(-1), but R just does not allow me to do that and it keeps complaining that "nonconformable array, etc." I tried the following two tricks and they worked: as.numeric(B/D) * solve(A) diag(as.numeric(B/D), 5, 5) %*% solve (A) ---------------------------- But if R cannot intelligently do scalar and matrix multiplication, it is really problemetic. It basically cannot be used to do computations, since in complicated matrix algebras, you have to distinguish where is scalar, and scalars obtained from quadratics cannot be directly used to multiply another matrix, etc. It is going to a huge mess... Any thoughts? [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html