How to create and use a lookup table : <p>I have a character vector of misspelled words:</p>

<pre><code>wordswrong &lt;- c("veh", "crrts", "ornges")
wordscorrect &lt;- c("vehicle", "carrots", "oranges")
</code></pre>

<p>Here's a dataframe:</p>

<pre><code>words &lt;- data.frame(terms = c("crrts oranges",
+                               "car is a veh", 
+                               "orngs bannas peas"))
</code></pre>

<p>How can I go through each word in words$terms and update based on my two vectors?</p>
