its (version 0.1.1)

its-join: Join Functions for Irregular Time-Series Objects

Description

Join functions for objects of class "its".

Usage

unionIts(x,y)
intersectIts(x,y)
alignedIts(obj1,obj2,print=TRUE)
appendIts(obj1,obj2,but=TRUE,matchnames=TRUE)

Arguments

x, y, obj1, obj2
an object of class "its"
print
logical flag to display summary information
but
logical flag controls whether overlap is disallowed
matchnames
logical flag controls whether names must match

Value

  • For unionIts, intersectIts, appendIts an object of class "its". For alignedIts, a list of two objects of class "its"

Details

unionIts has a number of time values (rows) which is determined by the union of the time-stamps of the two inputs. The number of columns is the sum of the number of columns of the two inputs. intersectIts has a number of time values (rows) which is determined by the intersect of the time-stamps of the two inputs. The number of columns is the sum of the number of columns of the two inputs. alignedIts selects the rows from two inputs which have identical time-stamps appendIts appends one object to the other, removing overlapping data from the later object, optionally checking that the column names match

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)
unionIts(b,diff(b))
intersectIts(b,diff(b))
alignedIts(b,diff(b))
a1 <- matrix(c(seq(from=24*60*60*30,by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3)
b1 <- as.its(a1)
appendIts(b,b1)

Run the code above in your browser using DataCamp Workspace