diff_by_ID | R Documentation |
First-order difference for grouped data
diff_by_ID(x, ID, ...)
x |
Vector of values |
ID |
Vector of group IDs, of same length as x |
... |
Optional parameters passed to difftime, if x is a vector of dates |
Vector of same length as x of first-order differences of x (and NAs for last value of each group ID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.