You are not linking the group_by()
command with the pipe operator so you are not passing a data frame as the first argument for the group_by()
function, I think the code should be something like this
library(dplyr)
totals <- my_data %>%
group_by(Behaviour_zoo, Odin_Lars) %>%
summarise() # Here you have to add anny summarizacion operation you want to perform by groups
If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.