its (version 0.1.1)

its-subset: Subsetting Functions for Irregular Time-Series Objects

Description

Subsetting functions for objects of class "its".

Usage

rangeIts(x,start=start.its(x),end=end.its(x),format=its.format(),...)
x[i,j]

Arguments

x
an object of class "its"
start, end
text representing start and end dates of the range to extract
format
format of "start" and "end" dates, see format.POSIXct.
i,j
indices specifying the parts to be extracted from the irregular time-series object
...
further arguments passed to as.POSIXct

Value

  • An object of class "its".

Details

rangeIts selects a range of rows that fall between two times, specified in text format. x[i,j] subscripting of an irregular time-series proceeds as for a matrix, with the exception that drop=FALSE is enforced, so the result always inherits from matrix.

See Also

ts, POSIXct, its-file, its-lags its-join its-times its-subset its-fin its-disp its-info its-cumdif its-arith

Examples

Run this code
a <- matrix(c(seq(by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3)
b <- as.its(a)
rangeIts(b,start = "1970-01-04" ,end= "1970-01-06" ,format= "%Y-%m-%d" )
b[1:3,]
b[,1]

Run the code above in your browser using DataLab