Learn R Programming

PMmisc (version 0.1.0)

fdiff: Calculating the difference of a time series

Description

Calculate the difference of a time series, with a specific lag period. The difference is used to show the change in value over set period.

Usage

fdiff(x,n)

Arguments

x

: a numeric vector

n

: number of lag periods

Examples

Run this code
# NOT RUN {
fdiff(mtcars[,2],1)
# }

Run the code above in your browser using DataLab