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

to.monthly, to.quarterly drop index tzone attribute #148

Closed
joshuaulrich opened this issue Jul 4, 2016 · 0 comments
Closed

to.monthly, to.quarterly drop index tzone attribute #148

joshuaulrich opened this issue Jul 4, 2016 · 0 comments
Assignees
Labels

Comments

@joshuaulrich
Copy link
Owner

R> x <- xts(1:2, as.Date(c("2015-12-01", "2016-01-01")))
R> unlist(attributes(.index(x)))
 tzone tclass 
 "UTC" "Date" 
R> unlist(attributes(.index(to.weekly(x))))
tzone.TZ   tclass 
   "UTC"   "Date" 
R> unlist(attributes(.index(to.monthly(x))))
   tclass 
"yearmon" 
R> unlist(attributes(.index(to.quarterly(x))))
   tclass 
"yearqtr" 
R> unlist(attributes(.index(to.yearly(x))))
tzone.TZ   tclass 
   "UTC"   "Date" 

The issue manifests inside xts:::.drop.time when indexClass is yearmon or yearqtr. The tzone attribute is present until the index(x) <- index(x) line in .drop.time.

@joshuaulrich joshuaulrich self-assigned this Jul 4, 2016
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