joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
818 stars 224 forks source link

Remove S4 classes #269

Open joshuaulrich opened 5 years ago

joshuaulrich commented 5 years ago

The setOldClass("xts") and setOldClass("zoo") calls in quantmod cause issues if other packages need to define those classes as well. For example, see https://github.com/edzer/spacetime/issues/35, and a StackOverflow question I answered a couple years ago.

I mentioned these to @jaryan and he would prefer to remove all the S4 classes from quantmod.

bastistician commented 5 years ago

I guess the following comment from the sources of the methods package also holds for "xts":

https://github.com/wch/r-source/blob/be05889aa5646e2c456486fd584be873ef3acd62/src/library/methods/R/BasicClasses.R#L531-L532

So maybe xts itself could setOldClass("xts") ?

joshuaulrich commented 5 years ago

Thanks for the suggestion @bastistician. That thought crossed my mind as well. Would you have time to try that and report back?

nguinasso commented 3 years ago

Has anyone fixed this yet? It is still bothering me.

joshuaulrich commented 3 years ago

@nguinasso I just tried to address it. It's going to take coordination with other package authors to get it released, so that may take several weeks.