I have a data table with more than 5'000'000 rows and 18 columns.
I would like to count all my rows for each year, if a certain column (occupation) is a specific value.
Fortunately, I was already able to successfully create the table, which obtains the desired occupation for each year and lists also the frequency.
Unfortunately, I struggle with counting the frequency of the occupation 9920 in each year. Therefore, my problem is that I don't know how to connect the data that is stored in my data table with the commands that count the frequency.
Thanks a lot for your reply! I've already tried to implement your advise, but it did not work..
I think my problem is just super basic, namely that I don't know really how to connect the data from my table with the commands listed below #Problem.
I think I only read the post title and your initial reply, so looking at the original request it does look like it was for dplyr. Nevermind, both would produce the same result.
That is because your data is in a data.frame or a tibble. You would have to install and load the data.table package plus you would have to convert your data.frame to a data.table.