This is a long-overdue post. I’m trying to get int the habit of posting and announcing each of my package releases. So I’m writing posts this morning for the most recent release of the most popular packages I maintain.
I’m going to highlight a handful of the changes:
- moving index class and index timezone from the xts object itself to the index,
- improvements to time-of-day subsetting (
- user contributions, and
- several bug fixes.
Changes to index attributes
The most significant user-facing change in this release is a bug-fix for the functions that would change the
tclass of the xts index. This would happen in calls to
period.apply(), and logical operations on
POSIXct indexes. Thanks to Tom Andrews for the report and testing, and to Panagiotis Cheilaris for contributing test cases (#322, #323).
This was a regression due to the main change in version 0.12-0. All the index-attributes were removed from the xts object and are now only attached to the index itself (#245). We took great care to maintain backward compatibility, and throw warnings when deprecated functions are called and when index-attributes are found on the xts object. I apologize for taking this long to get the fix on CRAN.
Then Claymore Marshall added many examples of time-of-day subsetting to
?subset.xts. He also fixed a bug in time-of-day subsetting where subsetting by hour only returned wrong results (#304, #326, #328).
There were also several more user-contributed changes. I love when the community that uses open source software contributes to the project! It’s so much more fun than working on it by myself. 🙂
These are in a bulleted list in order to highlight each user’s contribution.
Dirk Eddelbuettel updated the C API header to fix the signatures of
is_xts, which did not return the required type to be called via
.Call(). Thanks to Tomas Kalibera for the report (#317), and to Dirk for the PR (#337).
This is a breaking change, but it’s only in the C API, and is required to avoid the potential to crash your R session.
.xts() constructor would create an xts object with row names if
x had row names. This shouldn’t happen, because xts objects do not have or support row names (#298).
Several binary operations (e.g. +, -, !=, <, etc.) on variations of uncommon xts objects with other xts, matrix, or vector objects, could result in malformed xts objects (#295). Some examples of the types of uncommon xts objects: no dim attribute, zero-width, zero-length.
as.matrix() on an xts object without a dim attribute no longer throws an error (#294).
as.zoo.xts() is now only registered for zoo versions prior to 1.8-5. Methods to convert an object to another class should reside in the package that implements the target class. Thanks to Kurt Hornik for the report (#287).
.parseISO8601() no longer has a potential length-1 logical error. Thanks to Kurt Hornik for the report (#280).
I’m looking forward to your questions and feedback! If you have a question, please ask on Stack Overflow and use the [r] and [xts] tags. Or you can send an email to the R-SIG-Finance mailing list (you must subscribe to post). Open an issue on GitHub if you find a bug or want to request a feature, but please read the contributing guide first!