Takens time-delay embedding of one or more columns, returned as a
named data.frame matching pyEDM's Embed().
Embed(dataFrame = NULL, E = 0, tau = -1, columns = "",
includeTime = FALSE, pathIn = "./", dataFile = "")A data.frame of the embedding (with the time column first when
includeTime = TRUE).
A data.frame of input data. Column 1 is the time vector.
Embedding dimension.
Embedding delay in time-column rows (negative selects past lags).
Column name(s) to embed: a whitespace-separated string, or a character vector of column names.
If TRUE, prepend column 1 of dataFrame (the
time vector), keeping its original name, as the first output column.
Directory for dataFile (used when reading input from disk).
CSV file name to read as input; when set it takes precedence
over dataFrame.
Each columns item produces E lagged vectors. For column c and
step i = 0..E-1 the lag is i * |tau|, and the column is named
c(t-lag) when tau < 0 or c(t+lag) when tau > 0.
For example columns X, Y with E = 2, tau = -1 yield
X(t-0) X(t-1) Y(t-0) Y(t-1); with tau = -2 they yield
X(t-0) X(t-2) Y(t-0) Y(t-2).
If dataFile is supplied the CSV at file.path(pathIn, dataFile)
is read (preserving column names) and used as the input, taking precedence
over dataFrame.
All rows are retained; the first |tau| * (E-1) partial rows contain
NA.
Embed(data.frame(x = 1:10), E = 3, tau = -1, columns = "x")
Run the code above in your browser using DataLab