Learn R Programming

dse (version 2003.6-1)

diffLog: Calculate the difference of log data

Description

Calculate the difference from lag periods prior for log of data.

Usage

diffLog(x, lag=1, base = exp(1), ...)

Arguments

x
A time series.
lag
The difference is calculated relative to lag periods prior.
base
Base to use when calculating logrithms.
...
(further arguments, currently disregarded).

Value

  • A time series of the difference relative to lag periods prior for the log of the data. lag data points are lost from the beginning of the series. Negative values will result in NAs.

Examples

Run this code
if(is.R()) data("eg1.DSE.data", package="dse1")
z <- diffLog(outputData(eg1.DSE.data))

Run the code above in your browser using DataLab