Able to install but not load
cmohamma opened this issue · 6 comments
Looks like imputeTS relies on some exportable ggplot2 function that is no longer available?
Error: package or namespace load failed for ‘imputeTS’:
object ‘after_stat’ is not exported by 'namespace:ggplot2'
Thanks a lot for your report! I'll check this. Which ggplot2 version do you have installed?
There has been no ggplot2 cran update recently. Do you use the github develop version or a quite old ggplot2 version?
Would be great, if you could try to have the latest Cran ggplot2 version installed (and loaded) and try to load again.
Best
Steffen
I took another look - after_stat
is definitely exported by ggplot2 (current version 3.3.2). Think you have an old ggplot2 version. I'd suggest you update the ggplot version, then it should work again. (if this does not work, just open another issue) Best regards, Steffen
Thanks for the prompt response, you are absolutely correct, older version of ggplot2. Thanks!
Then a feature request, is it possible not to enforce that dependency? Doesnt seem like ggplot2 is a core feature of this package and it might limit the packages use for folks whose hands are tied on the ggplot2 version. Just a thought, thanks so much for a great package!
I gave your idea some thought. What is the reason for you to be tied to an older ggplot2 version? Are you using a server/cluster from your institute/company and you can't update packages there?
Is it possible not to enforce that dependency?
It would be. But, unfortunately all solutions for this issue have some drawbacks I don't like.
I'd expect the problem with older ggplot2 versions on servers/clusters that people can't update will somehow solve itself. In my experience while not being on the latest versions, these clusters are at least updated once in a while.
But what I'll definitely do as a result of your report is to add ggplot2 (≥ 3.3.0) instead of just ggplot to the package dependencies. This way users will get a meaningful error message already during installation. While people probably don't know at all what is wrong from the error message you got, I hope if the message is something like 'ggplot version 3.3.0 needed for installation' they will directly realize how to fix this. (if they can)
As promised, I made a commit today to add ggplot2 (≥ 3.3.0) as requirement to improve this.
Commit: 4573d12
(will also be on CRAN with the next version)
I also added a short shoutout to you in the package NEWS of the new version.
https://github.com/SteffenMoritz/imputeTS/blob/master/NEWS.md
Thanks again for reporting.