I have a large dataset containing rows (GP-practices) and columns (one for each combination of ICPC_code, agegroup and prescription) for example R74|65_75|J01CA04 and R74|75_plus|J01CA04 now i want to sum them to R74|65_plus|J01CA04.
I tried the mutate function:
df1 <- df %>%
mutate("R74|65_plus|J01CA04" = "R74|65_75|J01CA04" + "R74|75_plus|J01CA04")
but it didn't work as there was an error 'non numeric argument to binary operator' The column contains counts so the amount of patients and so only numbers. The column type is numeric.