View source: R/lagged_change.R
lagged_change | R Documentation |
lagged_change()
calculates the change between consecutive lagged values of x
.
cumulative_change()
calculates the change between the first value of x
and each subsequent value of x
.
lagged_change(x, type = "percent")
cumulative_change(x, type = "percent")
x |
Numeric vector |
type |
Type of change to calculate. Either "percent" or "absolute" |
Numeric vector of the same length as x
Shona Wilde
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.