# Randomly generate 10 values from a standard normal distribution
x <- rnorm(10)
# Calculate vector of proportion changes between subsequent values
y <- pchanges(x)
# Calculate percent changes instead
z <- pchanges(x, percent = TRUE)
# Compare results
x
y
z
Run the code above in your browser using DataLab