Hey! I am trying to combine the functions group_by with mutate but after the mutation, the result turns out not to be grouped.
These are the commands that I am using:
oecd_relative <- oecd_joined %>%
group_by(Year,country_code)%>%
mutate(PW_REAL_PPP = PW_REAL_PPP-mean(PW_REAL_PPP),PC_REAL_PPP = PC_REAL_PPP-mean(PC_REAL_PPP),REAL_PPP = REAL_PPP-mean(REAL_PPP))
Does anyone know what can be wrong? I want to group my mutation by year and country.