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

Replace direct access to tzone attribute #38

Merged
merged 1 commit into from
May 4, 2019
Merged

Replace direct access to tzone attribute #38

merged 1 commit into from
May 4, 2019

Conversation

joshuaulrich
Copy link
Contributor

It's best to access object attributes using provided methods, instead
of calling attr(x, 'foo'). So xts::indexTZ() should have been used.

The tzone attribute is being removed from the xts object after xts
version 0.11-2, and will only be attached to the index. indexTZ() is
also deprecated and replaced by tzone(), so we shouldn't use indexTZ().

Add a tzone() function that will handle tzone attributes for xts and
POSIXct objects. The xts index had a tzone attribute in xts version
0.8-8, so get the index attribute for xts objects, and the tzone
attribute for POSIXct (or any other) object. Use xts::tzone() if the
loaded xts version is greater than 0.11-2.

See joshuaulrich/xts#245 for details.

Fixes #37.

It's best to access object attributes using provided methods, instead
of calling attr(x, 'foo'). So xts::indexTZ() should have been used.

The tzone attribute is being removed from the xts object after xts
version 0.11-2, and will only be attached to the index. indexTZ() is
also deprecated and replaced by tzone(), so we shouldn't use indexTZ().

Add a tzone() function that will handle tzone attributes for xts and
POSIXct objects. The xts index had a tzone attribute in xts version
0.8-8, so get the index attribute for xts objects, and the tzone
attribute for POSIXct (or any other) object. Use xts::tzone() if the
loaded xts version is greater than 0.11-2.

See joshuaulrich/xts#245 for details.

Fixes #37.
@edzer edzer merged commit d3ed353 into edzer:master May 4, 2019
@edzer
Copy link
Owner

edzer commented May 4, 2019

Great, thank you so much!

@joshuaulrich joshuaulrich deleted the 37-tzone branch May 5, 2019 11:20
@joshuaulrich
Copy link
Contributor Author

Hi Edzer, I need to release the version of xts that triggers this error. This will cause a CRAN check failure in geoSpectral. Can you please prepare a spacetime release in the near future?

@edzer
Copy link
Owner

edzer commented Jan 24, 2020

Done, now; thanks!

@joshuaulrich
Copy link
Contributor Author

Thank you! I saw {spacetime} in incoming/ when I submitted {xts}, so thanks for getting it to CRAN quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace direct access of tzone attribute
2 participants