I have matrices stored within a list like something as follows:
a <- list(matrix(rnorm(50), ncol=5), matrix(rnorm(50), ncol=5))
b <- list(matrix(rnorm(50), nrow=5), matrix(rnorm(50), nrow=5))
I don't recall how to perform matrix multiplication on each list element
such that the result is a new list
result <- list(a[[1]]%*%b[[1]], a[[2]]%*%b[[2]])
I think I'm close with mapply(), but I'm doing something silly
mapply('%*%', a,b)
Thanks.
Harold
[[alternative HTML version deleted]]