Most efficient way to find and replace in R
<p>I have a dataframe key and a column in a dataframe that needs to be remapped according to the key. </p>

<pre><code>IDhex=c("asdj23","kjh23s")
IDHuman=c("Label1","Label2")

IDKey=data.frame(IDhex,IDHuman)
</code></pre>

<p><code>MasterDF$UserID</code> has a thousands of entries of either <code>asdj23</code>, <code>kjh23s</code> or <code>''</code> (empty).
I need to find an replace this column according to the mapping from <code>IDkey</code>. I need a coding solution that is INDEPENDENT OF IDKEY size. There will be a loop that takes in different keys that are 2xn in size.  </p>