diff() calculates the difference between values in a vector at a specified lag. Is there an equivalent function that works on two vectors? For example, I have:diff() calculates the difference between values
diff() calculates the difference between values in a vector at a specified lag. Is there an equivalent function that works on two vectors? For example, I have:diff() calculates the difference between values