title: R:How to replace string to integer?
body: <p>I have a dataset looks like:</p>
  
  <pre><code>classification  Interest    Age     Gender
  Card battle     IL029       18-24   male
  Card battle     IL001       45-54   male
  Card battle     IL001       18-24   male
  Card battle     IL001       35-44   male
  Card battle     IL001       35-44   male
  Card battle     IL013       35-44   male
  </code></pre>
  
  <p>How to replace "18-24" to 20,"35-44" to 40 and "45-54" to 50 in the age column?</p>