I get the following error message and do not know how to debug it:
> dt_final <- dt_final %>%
+ group_by(ID) %>%
+ mutate(returns = (x1-lag(x1))/lag(x1))
Error in `vec_as_location()`:
! `...` must be empty.
x Problematic argument:
* call = call