joshuaulrich / xts

Extensible time series class that provides uniform handling of many R time series classes by extending zoo.
http://joshuaulrich.github.io/xts/
GNU General Public License v2.0
220 stars 71 forks source link

Fixed shift.time issue #268 #273

Closed pverspeelt closed 5 years ago

pverspeelt commented 5 years ago

added S3method(shift.time, xts) to the namespace.

Calling methods(shift.time) now returns [1] shift.time.xts*

Running the following code will now work for xts objects.

df1 <- data.frame(dates = Sys.time() + 1:10, 
                  values = 1:10)

df1_xts <- xts(df1$values, order.by = df1$dates)
shift.time(df1_xts, n = 60)
joshuaulrich commented 5 years ago

I reworded the commit message to align with the commit messages section of the contributing guide. The Git commit message is much more important to me than the PR message on GitHub. The commit message is part of the repository, and exists independently of the hosting platform (e.g. GitHub, GitLab, Bitbucket, etc), while the PR message is specific to GitHub.