Check out example codes for "diff division R". It will help you in understanding the concepts better.

Code Example 1

x <- c(10, 20, 30, 40, 50)
x/lag(x)

Learn ReactJs, React Native from akashmittal.com