I have to calculate the return of a vector that gives a historical price series of a stock. The vector is of a form:
a <- c(10.25, 11.26, 14, 13.56)
You can do this:
(PRICE / lag(PRICE)-1) * 100