I have a function perc_diff that I use within dplyr\'s mutate. It calculates relative differences from the first value in group by default. But it
perc_diff
mutate