{
  "id": 8342,
  "title": "Importing data with R.matlab",
  "url": "/competitions/decoding-the-human-brain/discussion/8342",
  "author_name": "",
  "post_date": "2014-05-31T14:31:33.787Z",
  "votes": null,
  "comment_count": 1,
  "views": 1850,
  "content": "<p>I am importing&nbsp; the train_subject0x.mat files into R using the R.matlab library. The resulting R objects need further transformation to end up with a three-dimensional matrix.&nbsp;</p>\n<p>Has anyone been successful&nbsp;melting the imported vectors into a 3D matrix? If so, can you help me with a tip or pointer?</p>\n<p>This is how I import today:</p>\n<p>&nbsp; &nbsp; pathname &lt;- file.path( &quot;~/Projects/DecMeg2014/train/train_subject01.mat&quot;)<br>&nbsp; &nbsp; data &lt;- readMat(pathname,verbose=T)</p>\n<p>The resulting R objects are:</p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Length &nbsp; Class &nbsp; &nbsp;Mode <br>tmin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp;-none &nbsp; - numeric<br>tmax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp;-none &nbsp; - numeric<br>sfreq &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp;-none &nbsp; - numeric<br>y &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;594 &nbsp; -none &nbsp; - numeric<br>x &nbsp; &nbsp; 68161500 &nbsp; -none &nbsp;- numeric</p>\n<p>Don't know where to go from here.</p>",
  "messages": [
    {
      "id": "47391",
      "postDate": "05/31/2014 14:31:33",
      "content": "<p>I am importing&nbsp; the train_subject0x.mat files into R using the R.matlab library. The resulting R objects need further transformation to end up with a three-dimensional matrix.&nbsp;</p>\n<p>Has anyone been successful&nbsp;melting the imported vectors into a 3D matrix? If so, can you help me with a tip or pointer?</p>\n<p>This is how I import today:</p>\n<p>&nbsp; &nbsp; pathname &lt;- file.path( &quot;~/Projects/DecMeg2014/train/train_subject01.mat&quot;)<br>&nbsp; &nbsp; data &lt;- readMat(pathname,verbose=T)</p>\n<p>The resulting R objects are:</p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Length &nbsp; Class &nbsp; &nbsp;Mode <br>tmin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp;-none &nbsp; - numeric<br>tmax &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp;-none &nbsp; - numeric<br>sfreq &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp;-none &nbsp; - numeric<br>y &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;594 &nbsp; -none &nbsp; - numeric<br>x &nbsp; &nbsp; 68161500 &nbsp; -none &nbsp;- numeric</p>\n<p>Don't know where to go from here.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "47392",
      "postDate": "05/31/2014 14:38:35",
      "content": "<p>Please ignore&nbsp;- I&nbsp;just needed to read further on the Data page:</p>\n<p>&quot;X : the 3D data matrix, trial x channel x time (580 x 306 x 375).&quot;</p>\n<p>X is already a matrix. [insert embarrassed emoticon here].</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 47392,
      "author_name": "henrybowers",
      "author_url": "",
      "post_date": "05/31/2014 14:38:35",
      "content": "<p>Please ignore&nbsp;- I&nbsp;just needed to read further on the Data page:</p>\n<p>&quot;X : the 3D data matrix, trial x channel x time (580 x 306 x 375).&quot;</p>\n<p>X is already a matrix. [insert embarrassed emoticon here].</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "47391": "",
    "47392": ""
  },
  "source": "meta"
}