Say I have a data table like this:
id days age
"jdkl" 8 23
"aowl" 1 09
"mnoap" 4 82
"jdkl" 3 14
"jdkl" 2 34
"mnoap" 27 56
I want to create a new data table that has one column with the ids and one column with the number of times they appear. I know that data table has something with =.N, but I wasn't sure how to use it for only one column.
The final data table would look like this:
id count
"jdkl" 3
"aowl" 2
"mnoap" 1