I have a set of time series, and I want to scale each of them relative to their value in a specific interval. That way, each series will be at 1.0 at that time and change pr
Use first in dplyr, ensuring you use order_by
first
order_by
data %>% group_by(category) %>% mutate(value = value / first(value, order_by = year))