| laggedData | R Documentation | 
Given a time series vector, produces the input matrix and output vector for a time series prediction task. The other parameters are the lags to include and the number of steps ahead to predict.
laggedData(x, lags = 0:9, stepsAhead = 1)
x | 
  an   | 
lags | 
  which lags to use for prediction.  A   | 
stepsAhead | 
  how many steps ahead to predict.  A non-negative
integral value (  | 
The default parameters correspond to predicting one step ahead
(position t+1) using the ten most recent values
(positions t ... t-9).
A list with two components:
X | 
  The   | 
y | 
  The output   | 
Mikko Korpela
laggedData(1:20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.