poolCov <- function(weightMat, listOfMatrices, row) {
prods <- lapply(1:length(listOfMatrices), function(i) {
listOfMatrices[[i]] * weightMat[row, i]
})
Reduce("+", prods) / sum(weightMat[row,])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.