Intersect: Intersect of two objects of class RepoTimeInt

IntersectR Documentation

Intersect of two objects of class RepoTimeInt

Description

Intersect provides the intersection between two objects of class RepoTimeInt and length 1 or of all elements of an object of class RepoTimeInt and length greater than 1.

Usage

Intersect(x, y)

## S4 method for signature 'RepoTimeInt'
Intersect(x, y)

Arguments

x

Object of class RepoTimeInt.

y

Object of class RepoTimeInt.

Details

If argument y is missing, Intersect is applied iteratively on every successive component of the list of Interval-class objects. If argument y is not missing, the length of both arguments must be 1.

Value

Object of class RepoTimeInt resulting from intersecting the slot(s) lubriInt of the argument(s).

Examples

RepoPeriod1 <- newRepoTime('MM012015')
RepoPeriod2 <- newRepoTime('MM022015')
Intersect(RepoPeriod1, RepoPeriod2)

RepoPeriod1 <- newRepoTime('MM012015')
RepoPeriod2 <- newRepoTime('AA2015')
Intersect(RepoPeriod1, RepoPeriod2)


david-salgado/RepoTime documentation built on Feb. 2, 2024, 2:07 p.m.