79732412

Date: 2025-08-11 19:13:14
Score: 1
Natty:
Report link

This shoudl do what you described:

gens_avg_change <- gens_avg %>%
  group_by(hap) %>%
  mutate(percent_change=(avg-lag(avg))/lag(avg)*100)
  
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: BEVAN