I have a data frame that looks like this:
date time id datetime 1 2015-01-02 14:27:22.130 999000000007628 2015-01-02 14
Or we could use n_distinct from library(dplyr)
n_distinct
library(dplyr)
library(dplyr) df %>% group_by(date) %>% summarise(id=n_distinct(id))