title: How to do linear regression with Matrix?
body: <p>i have a problem doing the linear regression with three Matrix objects.</p>
  
  <pre><code>m1 = matrix(c(1:10))
  m2 = matrix(c(10:19))
  m3 = matrix(c(100:109))
  </code></pre>
  
  <p>I DO NOT have problem if i do:</p>
  
  <pre><code>mod = lm(m1+m2 ~ m3+0)
  </code></pre>
  
  <p>I have the problem if i only use TWO Matrixs, like:</p>
  
  <pre><code>m1 = matrix(c(1:20), ncol=2)
  m2 = matrix(c(1:10))
  
  mod = lm(m1 ~ m2+0)
  </code></pre>
  
  <p>in this case i get TWO coefficients for <strong>m2</strong>:</p>
  
  <pre><code>Coefficients:
      [,1]   [,2] 
  m2  1.000  2.429
  </code></pre>
  
  <p>but I do not want it I would like that the two columns of the <strong>m1</strong> matrix will be as the previous example (like two distinct columns)</p>
  
  <p>How to do it?</p>