title: How to do vlookup and fill down (like in Excel) in R?
body: <p>I have a dataset about 105000 rows and 30 columns. I have a categorical variable that I would like to assign it to a number. In Excel, I would probably do something with <code>VLOOKUP</code> and fill.</p>
  
  <p>How would I go about doing the same thing in <code>R</code>?</p>
  
  <p>Essentially, what I have is a <code>HouseType</code> variable, and I need to calculate the <code>HouseTypeNo</code>. Here are some sample data:</p>
  
  <pre><code>HouseType HouseTypeNo
  Semi            1
  Single          2
  Row             3
  Single          2
  Apartment       4
  Apartment       4
  Row             3
  </code></pre>