You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@clauswilke, unfortunately once I took a proper look, I realized the range functions in scales were not ready for primetime. I've just opened a PR in scales to fix them in the dev version but since scales 1.0.0 hit CRAN this morning, to avoid major headaches, bringing these into ggplot2 will need to wait until after the next scales release whenever that is.
The situation remains the same: the range functions are fixed in the dev version of scales but we have not had a new release. Now that my dissertation is (all but) finished, I've been meaning to give scales some more attention. Perhaps we can try for a release by end of summer and get this fixed.
@karawoo Tried to build a PR for this just now and am kicking myself because I've discovered scales::DiscreteRange does not currently support the na.rm argument to train_discrete which is critical. I will open a PR to scales now.
In lieu of waiting for a new scales release to make this switch, we could still eliminate the ggproto dependencies now but we will need to include a custom DiscreteRange object with the correct train function. I've made and tested that change here.
Is it a priority to make this switch now? Or should we continue to wait for this to be completely patched in scales?
How about making ggplot2 temporarily dependent on the development version of scales? In this way, we can properly test that the two packages work together as expected.
Activity
hadley commentedon Jun 22, 2018
I think we could easily rewrite to remove the dependency issue.
dpseidel commentedon Jul 17, 2018
Isn't this already done in scales: https://github.com/r-lib/scales/blob/master/R/range.r ?
clauswilke commentedon Jul 18, 2018
Indeed, looks like that is the case already. Is there any reason why ggplot2 shouldn’t just use those?
hadley commentedon Aug 7, 2018
I guess we forgot?
@dpseidel do you want to do a PR?
dpseidel commentedon Aug 7, 2018
Sure thing. I'll work one up this week.
dpseidel commentedon Aug 9, 2018
@clauswilke, unfortunately once I took a proper look, I realized the range functions in scales were not ready for primetime. I've just opened a PR in scales to fix them in the dev version but since scales 1.0.0 hit CRAN this morning, to avoid major headaches, bringing these into ggplot2 will need to wait until after the next scales release whenever that is.
paleolimbot commentedon Jun 25, 2019
@dpseidel Are the range functions now safe to use for ggplot2?
dpseidel commentedon Jun 25, 2019
The situation remains the same: the range functions are fixed in the dev version of scales but we have not had a new release. Now that my dissertation is (all but) finished, I've been meaning to give scales some more attention. Perhaps we can try for a release by end of summer and get this fixed.
karawoo commentedon Jun 24, 2020
It looks like this should be ready now that scales 1.1.0 was released last fall, @dpseidel is that right?
dpseidel commentedon Jun 25, 2020
@karawoo Should be! The updated range functions were released with scales 1.1.0
dpseidel commentedon Jun 25, 2020
@karawoo Tried to build a PR for this just now and am kicking myself because I've discovered
scales::DiscreteRangedoes not currently support thena.rmargument totrain_discretewhich is critical. I will open a PR to scales now.In lieu of waiting for a new scales release to make this switch, we could still eliminate the ggproto dependencies now but we will need to include a custom DiscreteRange object with the correct train function. I've made and tested that change here.
Is it a priority to make this switch now? Or should we continue to wait for this to be completely patched in scales?
clauswilke commentedon Jun 25, 2020
How about making ggplot2 temporarily dependent on the development version of scales? In this way, we can properly test that the two packages work together as expected.
thomasp85 commentedon Jun 25, 2020
I think that is fine. We are a long way from any release right now
karawoo commentedon Jun 25, 2020
Works for me. I also don't think it's a huge priority to make the switch now, I just happened to see this issue was still open.