When using the difference function, a TS package should NOT cross through the variables specified in the "key" argument.
I know that I can group_by before taking the difference, but if I have to do that myself, it makes me wonder if the function is handling the "index" variable correctly (i.e., what if the data is not sorted by "index"?).
When using the difference function, a TS package should NOT cross through the variables specified in the "key" argument. I know that I can group_by before taking the difference, but if I have to do that myself, it makes me wonder if the function is handling the "index" variable correctly (i.e., what if the data is not sorted by "index"?).