title: Count number of unique studies according to a condition in R
body: <p>I am performing a meta-analysis in R in which an individual study can contribute multiple effect sizes. This is what the data frame looks like:</p>
  <pre><code>   Study ID   Country           
     1          US  
     1          US
     2          Australia
     3          Canada
     4          US
  </code></pre>
  <p>What I want to do is count how many times a study was performed in a specific country, and to do so need to ignore rows from studies with the same ID. In this case, I want the output to return a count of &quot;2&quot; for &quot;US&quot;, as even though this is listed three times, two of the observations come from the same study (Study ID 1).</p>
  <p>Hopefully someone can help me find an easy way to do this!</p>