matrix.multiply <- function(A,s,option=1){
if(option==2)
return(A*(s%*%t(rep(1,dim(A)[2]))))
if(option==1)
return(A*(rep(1,dim(A)[1])%*%t(s)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.