dataSlice: Subset or Resample idframe data

Description Usage Arguments Details Value See Also Examples

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

1
dataSlice(data, start = NULL, end = NULL, freq = NULL)

Arguments

data

an object of class idframe

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

window

Examples

1
2
3
4
5
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  

sysid documentation built on May 2, 2019, 4:18 a.m.