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

Remove as.zoo.data.frame() #414

Open
joshuaulrich opened this issue Mar 4, 2024 · 0 comments
Open

Remove as.zoo.data.frame() #414

joshuaulrich opened this issue Mar 4, 2024 · 0 comments
Assignees

Comments

@joshuaulrich
Copy link
Owner

joshuaulrich commented Mar 4, 2024

quantmod::as.zoo.data.frame() overwrites zoo's S3 registry entry when quantmod is loaded. The quantmod method was added in 2007, and the zoo method was not added until 2010. The package that owns the class should define the conversion method, so the as.zoo.*() methods should be in zoo.

Removing quantmod::as.zoo.data.frame() may break user code, because it converts rownames to Date before using them as the index for the zoo object, and the zoo method only uses an integer index by default.

The migration was started in 9343d9a by by printing a message the first time the quantmod method is called. Throw a warning so the method can be remnoved in the next major release.

Related to #315.

@joshuaulrich joshuaulrich self-assigned this Mar 4, 2024
joshuaulrich added a commit that referenced this issue Mar 4, 2024
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

1 participant