Skip to content

CRAN release 0.13.0

Compare
Choose a tag to compare
@joshuaulrich joshuaulrich released this 26 Feb 18:43
· 189 commits to main since this release

New Features

  • Added a xts method for na.fill() to significantly increase performance when 'fill' is a scalar. (#259)

  • as.xts() will look for a time-based column in a data.frame if it cannot create an index from the row names. (#381)

  • Change print() xts method to only show the first and last 'show.rows' rows if number of rows is > 'max.rows'. (#321)

  • Made str() output more descriptive for xts objects. It now differentiates between xts objects that are empty, zero-width, or zero-length, and defines each type of object. It also adds column names to the output. (#168, #378)

  • Add startup warning that dplyr::lag() breaks method dispatch, which means calls to lag(my_xts) won't work any more.

  • Added open-ended time of day subsetting ranges. This allows users to subset by time of day from the start/end of the day without providing the start/end times (00:00:00.000/23:59:59.999). For example:

    x["/T1800"]  # between the start of the day and 5pm
    x["T0500/"]  # between 5am and the end of the day

    Thanks to Chris Katsulis for the suggestion! (#243)

  • Updated to.period() to accept custom 'endpoints' via the 'period' argument. Now you can aggregate on something other than the times that 'endpoints()' supports. Thanks to Ethan B. Smith for the suggestion! (#302)

Fixes

  • Fixed typo and expand period.apply() documentation. (#205)

    The original description has:

    • "the data from INDEX[k] to INDEX[k+1]"

    But that's not consistent with the code. It should be:

    • "the data from INDEX[k]+1 to INDEX[k+1]"
  • Calls to merge.xts() on zero-width objects now match merge.zoo(). Previously, merge.xts() would return empty xts objects if called on two or more zero-width xts objects. merge.zoo() would return a zero-width object with the correct index. (#227, #379)

  • Fixed Ops.xts() so it always returned an object with the same class as the first (left-hand side) argument. It previously returned an xts object even if the first argument was a subclass of xts. (#49)

Other

  • Migrated unit tests from RUnit to tinytest. Thanks Mark van der Loo!

  • Updated the endpoints() documentation to make it clearer that the result is based on the UNIX epoch (midnight 1970, UTC). Thanks to GitHub user Eluvias for the suggestion! (#299)

  • Fixed reclass() to ensure it always adds index attributes from the 'match.to' argument. It was not copying tclass, tzone, or tformat from 'match.to' to the result object. (#43)

  • Removed an unnecessary check in na.locf() (which is not user-facing). Thanks to GitHub user @cgiachalis for the suggestion! (#307)

  • Updated C entry points so they're not able to accidentally be found via dynamic lookup (i.e. .Call("foo", ...)). This makes each call to the C code a few microseconds faster, which is nice. (#260)

  • Made merge.xts() results consistent with merge.zoo() for zero-length xts objects with columns. The result of merge.xts() did not include the columns of any objects that had one or more columns, but zero rows. A join should include all the columns of the joined objects, regardless of the number of rows in the object. This is consistent with merge.zoo(). Thanks to Ethan B. Smith for the report and testing! (#222)