title: In R, how do I replace a string that contains a certain pattern with another string?
body: <p>I'm working on a project involving cleaning a list of data on college majors. I find that a lot are misspelled, so I was looking to use the function <code>gsub()</code> to replace the misspelled ones with its correct spelling. For example, say 'biolgy' is misspelled in a list of majors called Major. How can I get R to detect the misspelling and replace it with its correct spelling? I've tried <code>gsub('biol', 'Biology', Major)</code> but that only replaces the first four letters in 'biolgy'. If I do <code>gsub('biolgy', 'Biology', Major)</code>, it works for that case alone, but that doesn't detect other forms of misspellings of 'biology'.</p>
  
  <p>Thank you!</p>