I'm using dcast to transpose the following table
date event user_id
25-07-2020 Create 3455
25-07-2020 Visit 3567
25-07-2020 Visit 3567
25-07-2020 Add 3567
25-07-2020 Add 3678
25-07-2020 Add 3678
25-07-2020 Create 3567
24-07-2020 Edit 3871
I'm using dcast to transpose to have my events as columns and count user_id
dae_summ <- dcast(ahoy_events, date ~ event, value.var="user_id")
But I'm not getting unique user id's. its counting the same user_id multiple times. What can I do to get one user_id counted only one time for the same date and event.