My dataframe looks like this:
Now i want to summarize all the data for each Video.ID. The problem are columns like category, where i cannot apply sum or mean or something. I tried the following
small %>%group_by(Video.ID) %>% summarise(sumr=sum(Partner.Revenue),len=mean(Video.Duration..sec.),cat=mean(Category))
mean(Category) is clearly wrong, but I do not know how to fix it. One video id only ever has one category, how to I get dplyr to just pick that in the summary ?
I know its a beginner question and most likely silly, but I just cannot find a solution. All tips are appreciated.