Learn R Programming

h2o (version 2.8.4.4)

diff.H2OParsedData: Lagged Differences of H2O Dataset

Description

diff.H2OParsedData, a method for the diff generic. Calculate the lagged and iterated differences of a single numeric column in a H2O dataset.

Usage

## S3 method for class 'H2OParsedData':
diff(x, lag = 1, differences = 1, ...)

Arguments

x
An H2OParsedData object.
lag
An integer indicating which lag to use. Must be greater than 0.
differences
An integer indicating the order of the differences. Must be greater than 0.
...
Potential further arguments. (Currently unimplemented).

Value

  • An H2OParsedData object with a single numeric column containing the successive lagged and iterated differences. If differences = 1, this is equivalent to x[(1+lag):n] - x[1:(n-lag)]. For differences greater than 1, the algorithm is applied recursively to x.

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath)
diff(prostate.hex$AGE)

Run the code above in your browser using DataLab