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

[R-Forge #2753] which.i argument ignored with zero-width xts #12

Closed
joshuaulrich opened this issue Feb 26, 2015 · 3 comments
Closed

[R-Forge #2753] which.i argument ignored with zero-width xts #12

joshuaulrich opened this issue Feb 26, 2015 · 3 comments
Labels

Comments

@joshuaulrich
Copy link
Owner

Submitted by: Garrett See
Assigned to: Joshua Ulrich
R-Forge link

This is the unexpected behavior:

x <- .xts(, 1:10)
x[endpoints(x, 'seconds', 3), which.i=TRUE]
[,1]
1969-12-31 18:00:02 NA
1969-12-31 18:00:05 NA
1969-12-31 18:00:08 NA
1969-12-31 18:00:10 NA

I expected it to give the same result as an object that has a column:

x <- .xts(rep(42, 10), 1:10)
x[endpoints(x, 'seconds', 3), which.i=TRUE]
[1] 2 5 8 10

packageVersion('xts')
[1] ‘0.9.3.2’

Followups:

Date: 2013-08-26 12:59
Sender: Joshua Ulrich
Fixed in r789.

@michaelsbradleyjr
Copy link

Has there been a regression with this bug? I'm getting the previous unexpected behavior with xts version 0.9-7.

@joshuaulrich
Copy link
Owner Author

There may have been, but there's no issue with the current development version.

R> x <- .xts(, 1:10)
R> x[endpoints(x, 'seconds', 3), which.i=TRUE]
[1]  2  5  8 10
R> packageVersion('xts')
[1] ‘0.10.0

@michaelsbradleyjr
Copy link

Installed the current dev version via devtools, works great, thanks!

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

2 participants