title: Convert array of arrays to object of arrays, using ramda
body: <p>Given an array of either 2d or 3d data. How can one create a function that converts the data to object of arrays, where the inner index maps to x, y or z depending on if the index is 0, 1 or 2 respectively. For example:</p>
  <pre class="lang-js prettyprint-override"><code>// 2d
  const inputData2d = [
      [-1, 4],
      [3, 6],
      [9, -8],
  ]
  
  const outputData2d = {
      x: [-1, 3, 9],
      y: [4, 6, -8],
  }
  
  // 3d
  const inputData3d = [
      [-1, 4, 5],
      [3, 6, 2],
      [9, -8, 5],
  ]
  
  const outputData3d = {
      x: [-1, 3, 9],
      y: [4, 6, -8],
      z: [5, 2, 5],
  }
  </code></pre>
  <p>The function should also be able to handle both 2d and 3d data, behaving as expected. I've explored using <code>pipe</code> and <code>assoc</code> but no luck as of yet.</p>