title: merging data and receiving a big loss of data
body: <p>I've been preparing my data and somehow I have way less data after merging my data sets. </p>
  
  <p>Since I don't have the longitude and latitude in my data I've been using the following code after I downloaded the package <strong>zipcode</strong> (<code>tel1</code> is my data containing zipcodes)</p>
  
  <pre><code>merge &lt;- merge(zipcode,tel1,by.x=c('zip'),by.y=c('zip_code'))
  </code></pre>
  
  <p>Before merging I had 195956 observations, while after merging it dropped down to 180090, but I don't understand why. </p>
  
  <p>In my opinion I just merged them where <code>zip</code> was equal to <code>zip_code</code> and I added the information from the dataset zipcode to my folder tel1</p>
  
  <p>Afterward I wanted to remove the rows that contain NA because the merge couldn't define any numbers or whatever. I used this code</p>
  
  <pre><code>final &lt;- result[complete.cases(result),]
  </code></pre>
  
  <p>Then my number of observations dropped down to 51006 which I just can't believe. There can't be so many mismatches in my data.</p>
  
  <p>Is there any other code that I should use? </p>
  
  <p>Afterwards I've been trying to delete the duplicates with the code</p>
  
  <pre><code> last &lt;- with(final,final[order(state,latitude,longitude),])
  </code></pre>
  
  <p>but the number of observations was consistent (51006).</p>
  
  <p>What did I do wrong or is there a way to get my data into an excel file again after merging the data so I could manually check if there are really so many mismatches?
  Thanks</p>