Irregularly Spaced Time-Series
its is used to create irregular time-series
as.its coerces an object to an irregularly spaced
is.its tests whether an object is an irregularly
spaced time series.
its(x,dates=as.POSIXct(x=strptime(dimnames(x)[],format=its.format())), names=dimnames(x)[],format=its.format(),...) as.its(x,...) is.its(object) its.format(format=NULL)
- a vector of class
"POSIXct"representing the time-stamps of the irregular time-series object. The elements of the numeric vector are construed as the number of seconds since the beginning of 1970, see
- a numeric matrix representing the values of the
irregular time-series object. In the case of coercion, the first
column is taken to be the time-stamps, in seconds since the beginning
of 1970, see
- an irregular time-series object
- a vector of mode character
- a formatting string, see
format.POSIXct, defaults to
formatis not specified.
- further arguments passed to or from other methods:
The function its is used to create irregular time-series ("its") objects.
An object of class "its" is a matrix with rows indexed by a time-stamp
of class "POSIXct". Unlike objects of class "ts", it can be used to
represent irregularly spaced time-series. The object consists of a
matrix, with a single slot, the named POSIX vector named "dates".
An object of class its inherits matrix arithmetic methods. The matrix
has dimnames: dimnames[] is populated with a text representation of
"dates", using a format which is defined by the function its.format.
its.format returns a formatting string, and assigns a format variable
its..format globally, which persists in the session until reset.
as.its, an object of class
"its", inheriting from matrix, with a single slot named
'dates', which is a vector of class
is.its, a logical representing the result of a test for class membership For
its.format, a text representation of dates formatting for dimnames, see
its.format("%Y-%m-%d") #defines text format of dates read from dimnames mat <- structure(1:6,dim=c(2,3),dimnames=list(c("2003-01-01","2003-01-04"),letters[1:3])) its(mat) its.format("%Y%m%d") #defines text format of dates written to dimnames times <- as.POSIXct(strptime(c("1999-12-31 01:00:00","2000-01-01 02:00:00"),format="%Y-%m-%d %X")) its(mat,times) its.format("%Y-%m-%d %X") its(mat,times) is.its(its(mat,times)) its.format("%Y%m%d %X") #defines text format of dates written to dimnames as.its(mat)