Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging only zero-width xts objects returns a zero-length result #227

Closed
joshuaulrich opened this issue Mar 12, 2018 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@joshuaulrich
Copy link
Owner

merge.xts() returns a completely empty xts object if you merge only empty objects. merge.zoo() returns a zero-width object with the appropriate index values.

> merge(.xts(,1:3), .xts(,2:4))  # index is empty
Data:
numeric(0)

Index:
integer(0)
> merge(zoo(,1:3), zoo(,2:4))  # index is merged
Data:
numeric(0)

Index:
[1] 1 2 3 4
> merge(.xts(,1:3), .xts(,2:4), .xts(,0:2))   # index is empty
Data:
numeric(0)

Index:
integer(0)
> merge(zoo(,1:3), zoo(,2:4), zoo(,0:2))    # index is merged
Data:
numeric(0)

Index:
[1] 0 1 2 3 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant