Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206316

How do you find the number of unique values that span multiple columns?

$
0
0

How do you find the number of unique values when they span multiple columns. In my case, I am trying to get a count of the number of times each latitude/longitude occurs.

For example

+------------+
|  Lat Long  |
+------------+
| 39.3 -76.6 |
| 39.3 -76.6 |
| 39.3 -76.6 |
| 39.9 -76.1 |
+------------+

Would output

+---------------+
| Lat Long Freq |
+---------------+
| 39.3 -76.6 3  |
| 39.9 -76.1 1  |
+---------------+

Viewing all articles
Browse latest Browse all 206316

Trending Articles