This is an xts method compatible with merge.zoo, as xts extends zoo.
That documentation should also be referenced.
Difference are noted where applicable.
Implemented almost entirely in custom C-level code,
it is possible using either the all argument or
the join argument to implement all common
database join operations along the to-be-merged objects
time-index: ‘outer’ (full outer - all rows),
‘inner’ (only rows with common indexes),
‘left’ (all rows in the left object, and those that match in the right),
and ‘right’ (all rows in the right object, and those that match in the left).
The above join types can also be expressed as a vector of
logical values passed to all. c(TRUE,TRUE) or TRUE for ‘join="outer"’,
c(FALSE,FALSE) or FALSE for ‘join="inner"’, c(TRUE, FALSE) for ‘join="left"’,
and c(FALSE,TRUE) for ‘join="right"’.
Note that the all and join arguments imply a two case scenario. For merging
more than two objects, they will simply fall back to a full outer or full inner join,
depending on the first position of all, as
left and right can be ambiguous with respect to sides.
To do something along the lines of merge.zoo's method of joining based on
an all argument of the same length of the arguments to join, see the example.
The resultant object will have the timezone of the leftmost
argument if available. Use tzone to override.
If retclass is NULL, the joined objects will be split
and reassigned silently back to the original environment they are called
from. This is for backward compatibility with zoo, though unused
by xts.
If retclass is FALSE the object will be stripped of
its class attribute. This is for internal use.