title: What are the differences between vector, matrix and array data types?
body: <p>R comes with three types to store lists of homogenous objects: <code>vector</code>, <code>matrix</code> and <code>array</code>.</p>
  
  <p>As far as I can tell:</p>
  
  <ul>
  <li><code>vector</code> is special cases for 1 dimension arrays</li>
  <li><code>matrix</code> is a special case for 2 dimensions arrays</li>
  <li><code>array</code> can also have any dimension level (including 1 and 2).</li>
  </ul>
  
  <p>What is the difference between using 1D arrays over vectors and 2D arrays over matrices? Do we need to cast between those, or will it happen automagically?</p>