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:
Study ID Country
1 US
1 US
2 Australia
3 Canada
4 US
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 "2" for "US", as even though this is listed three times, two of the observations come from the same study (Study ID 1).
Hopefully someone can help me find an easy way to do this!