title: Replace roman numerals and create a variable with year-quarter date
body: <p>I want to adjust a column to use it as a date variable in a chart. However the variable contains Roman numerals as month and on the other hand a year displayed in Arabic numerals.</p>
  
  <pre><code> Factor w/ 34 levels "I-III 2010","I-III 2011",..
  </code></pre>
  
  <p>I'd like to transform these values into the following pattern (year-quarter ): 2010-1 , 2011-1.</p>
  
  <p>I tried the following, but not sure if it's the best way to approach my problem.</p>
  
  <pre><code>df$var = gsub("I-III", "1 -", df$var)
  df$var = gsub("IV-VI", "2 -", df$var)
  df$var = gsub("VII-IX","3 -", df$var)
  df$var = gsub("X-XII","4 -", df$var)
  </code></pre>
  
  <p>What would you recommend?</p>
  
  <p>Thanks</p>