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 #5414] Ops.xts shouldn't change derived class #49

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

[R-Forge #5414] Ops.xts shouldn't change derived class #49

joshuaulrich opened this issue Feb 26, 2015 · 0 comments
Labels
Milestone

Comments

@joshuaulrich
Copy link
Owner

Submitted by: Joshua Ulrich
Assigned to: Nobody
R-Forge link

library(xts)
# sample data
st <- Sys.time()
x1 <- xts(1, st)
x2 <- xts(2, st)
# change class
class(x1) <- c('foo','xts','zoo')
class(x2) <- c('foo','xts','zoo')
# call Ops.xts
x3 <- x1 + x2
class(x3)
# [1] 'xts' 'zoo' # expected 'foo' 'xts' 'zoo'
@joshuaulrich joshuaulrich added this to the 0.12.3 milestone Oct 13, 2022
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