title: Element-Wise Matrix Multiplication in Rcpp
body: <p>I am working on a code that requires an element-wise matrix multiplication. I am trying to implement this in Rcpp since the code requires some expensive loops. I am fairly new to Rcpp, and may be missing something, but I cannot get the element-wise matrix multiplication to work.</p>
  
  <pre><code>// [[Rcpp::export]]
  
  NumericMatrix multMat(NumericMatrix m1, NumericMatrix m2) {
      NumericMatrix multMatrix = m1 * m2 // How can this be implemented ?
  }
  </code></pre>
  
  <p>I may be missing something very trivial, and wanted to ask if there was any method to do this (other than using loops to iterate over each element and multiply).</p>
  
  <p>Thanks in advance.</p>