dataSlice {sysid} | R Documentation |
Subset or Resample idframe data
Description
dataSlice
is a subsetting method for objects of class idframe
. It
extracts the subset of the object data
observed between indices start
and end
. If a frequency is specified, the series is then re-sampled at the
new frequency.
Usage
dataSlice(data, start = NULL, end = NULL, freq = NULL)
Arguments
data |
an object of class |
start |
the start index |
end |
the end index |
freq |
fraction of the original frequency at which the series to be sampled. |
Details
The dataSlice function extends the window
function for idframe objects
Value
an idframe object
See Also
Examples
data(cstr)
cstrsub <- dataSlice(cstr,start=200,end=400) # extract between indices 200 and 400
cstrTrain <- dataSlice(cstr,end=4500) # extract upto index 4500
cstrTest <- dataSlice(cstr,start=6501) # extract from index 6501 till the end
cstr_new <- dataSlice(cstr,freq=0.5) # resample data at half the original frequency
[Package sysid version 1.0.4 Index]