title: Reading non-rectangular data in R
body: <p>I have a fairly large data set in csv format that I'd like to read into R. The data is annoyingly structured (my own fault) as follows:</p>
  
  <pre><code>,US912828LJ77,,US912810ED64,,US912828D804,...
  17/08/2009,101.328125,15/08/1989,99.6171875,02/09/2014,99.7265625,...
  </code></pre>
  
  <p>And with the second line style repeated for a few thousand times. The structure is that each pair of columns represents a timeseries of differing lengths (so that the data is not rectangular).</p>
  
  <p>If I use something like</p>
  
  <pre><code>&gt;rawdata &lt;- read.csv("filename.csv")
  </code></pre>
  
  <p>I get a dataframe with all the blank entries padded with NA, and the odd columns forced to a factor datatype.</p>
  
  <p>What I'd like to ultimately get to is either a set of timeseries objects (for each pair of columns) named after every even entry in the first row (the "US912828LJ77" fields) or a single dataframe with row labels as dates running from the minimum of (min of each odd column) to max of (max of each odd column).</p>
  
  <p>I can't imagine I'm the only mook to put together a dataset in such an unhelpful structure but I can't see any suggestions out there for how to deal with this. Any help would be greatly appreciated!</p>