title: R: multiply two arrays
body: <p>I have a 2d array</p>
  
  <p><code>P = array(1,dim = c(2,2))</code></p>
  
  <p>and I want to multiply it with</p>
  
  <p><code>x = c(1,1)</code></p>
  
  <p>I am interested in the quantity matrix multiplication of P with x transpose.</p>
  
  <p>I can't use <code>P*x</code> since R assumes that x is of dimension 1x2. Whats the easiest way to achieve this?</p>