title: multiply each columns of a matrix by a vector
body: <p>I have </p>
  
  <pre><code>mat&lt;-matrix(1:12,3)
  vect&lt;-c(2,2,2) 
  </code></pre>
  
  <p>How can I multiply each column by the vector in order to obtain:</p>
  
  <pre><code>2,  8, 14, 20
  4, 10, 16, 22
  6, 12, 18, 24
  </code></pre>