powered by
Calculate the percent change in `y` from one period to the next
pct_chng(y, lag = 1)
data
number of periods for percent change
The percentage change among the lag period
# NOT RUN { pct_chng(c(100,50,100,20,100,110)) # }
Run the code above in your browser using DataLab