-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
shift.time: no applicable method for 'shift.time #268
Comments
Thanks for the report! I agree this is a bug, and agree with your proposed solution. Would you like to create a PR to add |
Accidentally pushed close button when trying to link it to the PR :-( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
shift.time is an exported function of xts, but if you try to use it, it will result in an error.
Expected behavior
shift.time.xts is the underlying function called when you have an xts object and you want to shift the time by n seconds.
Reason
I found that the reason why this doesn't work is that shift.time.xts is not exported as an s3 method in the namespace. Adding
S3method(shift.time, xts)
to the namespace will resolve this issue.Minimal, reproducible example
Following code will result in the error
using the following code, the shift works
xts:::shift.time.xts(df1_xts, n = 60)
Session Info
The text was updated successfully, but these errors were encountered: