How do I sum the total number of values against a given value in another column?

I have around 606,000 rows of appointment data and want to pull certain things out of it.

First, I want to split it out by site, and then the number of appointments booked on each date at each site.

Something like:

Iterate through `Site` column
    For every `site` in `Site`
        For every `date` in `Date`
            Count total number of appointments booked

Hopefully this example makes things a little clearer.

Ultimately, I want to be able to look at the next seven days and see how many appointments are booked at each site across each of the seven days.

How can I achieve this?

I've figured it out.

Using count from dplyr, I can simply run:

dataset %>% count(site, date)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.