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

Add option to warn about deprecated attributes #306

Closed
joshuaulrich opened this issue Aug 6, 2019 · 2 comments
Closed

Add option to warn about deprecated attributes #306

joshuaulrich opened this issue Aug 6, 2019 · 2 comments
Assignees
Milestone

Comments

@joshuaulrich
Copy link
Owner

There are several warnings about the deprecated attributes that were (re)moved in #245. These may be extremely verbose in some cases, and may cause errors in other cases. For example, an error occurred in the reverse dependency check for the 'portfolioBacktest' package, when foreach() %dopar% was called with a 'snow' backend.

Make these warnings conditional on a global option (e.g. xts_warn_deprecated). Set the option to FALSE by default, and add a message to .onAttach() to suggest users run their scripts with it set to TRUE. The default will be set to TRUE on the next non-patch release.

@joshuaulrich joshuaulrich added this to the 0.12-0 milestone Aug 6, 2019
@joshuaulrich joshuaulrich self-assigned this Aug 6, 2019
@joshuaulrich joshuaulrich modified the milestones: 0.12-0, 0.12-1 Jul 12, 2020
@joshuaulrich joshuaulrich modified the milestones: 0.12.1, 0.12.2 Sep 9, 2020
@joshuaulrich joshuaulrich modified the milestones: 0.12.2, 0.12.3 Oct 12, 2022
@braverock
Copy link
Contributor

The warning should point to a note in the documentation about how to fix this issue. A Google search for the error message doesn't lead to anything useful either.

@braverock
Copy link
Contributor

# if 'x' is an outdated xts object:
tclass(x) <- "Date"
tzone(x) <- "UTC"

The setters remove the attributes from the xts object and put them on the index.

@joshuaulrich joshuaulrich modified the milestones: 0.13.0, 0.13.1 Jan 17, 2023
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

No branches or pull requests

2 participants