title: Creating new variable and new data rows for country-conflict-year observations
body: <p>I'm very new to R, still learning the very basics, and I haven't yet figured out how to perform this particular operation, but it would save me lots and lots of labor and time.</p>
  
  <p>I have a dataset of international conflicts with columns for country and dates that looks something like this:</p>
  
  <pre><code>country     dates
  Angola      1951-1953
  Belize      1970-1972
  </code></pre>
  
  <p>I would like to reorganize the data to create variables for start year and end year, as well as create a year-observed (call it 'yrobs') column, so the set looks more like this:</p>
  
  <pre><code>country     yrobs  yrstart     yrend
  Angola      1951     1951       1953
  Angola      1952     1951       1953
  Angola      1953     1951       1953
  Belize      1970     1970       1972
  Belize      1971     1970       1972
  Belize      1972     1970       1972
  </code></pre>
  
  <p>Someone suggested using data frames and a double for-loop, but I got a little confused trying that. Any help would be greatly appreciated, and feel free to use dummy language, as I'm still pretty green to the programming here. Thanks much.</p>