title: How to replace misspelled words in a table with the correct ones using R
body: <p>I have a table where a column has some misspelled strings, lets say as an example:</p>
  
  <p><code>table$Status</code> returns these values:</p>
  
  <pre><code>"alive" "sic" "alive" "sick" "alive" "si" "alive" "ali"   "alv"  
  "dead" "alive" "alive" "alive" "al"    "dead"  "dead"  "de"    "dead" 
  "dead"  "dea"   "dead"  "al"   "dead"  "de"    "al"  "de"    "sick" 
  "dead"  "alive"
  </code></pre>
  
  <p>I want to have <strong>alive</strong>, <strong>sick</strong> or <strong>dead</strong> like the following example:</p>
  
  <pre><code>"alive" "sick" "alive" "sick" "alive" "sick" "alive" "alive"   "alive"  
  "dead" "alive" "alive" "alive" "alive"    "dead"  "dead"  "dead"    "dead" 
  "dead"  "dead"   "dead"  "alive"   "dead"  "dead"    "alive"  "dead"    "sick" 
  "dead"  "alive"
  </code></pre>
  
  <p>I know there is this function from the package <code>RecordLinkage</code> to get the distance between strings like:</p>
  
  <pre><code>levenshteinSim("al", "alive")
  </code></pre>
  
  <p>So i will be comparing every single value with another and get the best similarities, also I know by using  <code>table(Table$Status)</code> I will get the number of the most repeated values and those will be the correct. </p>
  
  <p>But here is my question how can I compare them all with each other and replace my table?? If someone knows an easy way to do it would be really helpful.</p>