Positions Object Union With Tolerance

DESCRIPTION:

Make a union of numeric or bdNumeric or calendar positions (i.e. positions of series objects, which can be numeric, bdNumeric, bdTimeDate, or time vectors or sequences) objects using localzone and matchtol as in the seriesMerge and align functions.

USAGE:

unionPositions <- function(..., localzone = F, matchtol = 0) 

OPTIONAL ARGUMENTS:

...
positions objects to be joined.
localzone
if T, union by matching with all passed-in positions (must be calendar-based) in their local time zones, instead of with the absolute GMT times.
matchtol
tolerance for matching positions. Positions which match within matchtol will not be duplicated in the output.

VALUE:

a new positions object containing all of the input positions, with duplicates (as defined by matchtol and localzone) removed. Returns numeric(0) if no ... arguments are given.

SEE ALSO:

class, , .

EXAMPLES:

unionPositions(1:10, 5:20) 
unionPositions(1:10, 5.1:20.1, matchtol=.3) 
unionPositions(timeCalendar(d=1:10), timeCalendar(d=5:20)) 
unionPositions(timeCalendar(d=1:10, zone="PST"),  
               timeCalendar(d=5:20, zone="EST")) 
unionPositions(timeCalendar(d=1:10, zone="PST"),  
               timeCalendar(d=5:20, zone="EST"), localzone=T)