-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Clarify the current status of fortify() #3816
Comments
This sounds like a good proposal to me, but it'll need to wait until a major/minor release. |
I'm considering the docs bullet adressed by #5745 |
|
Thanks for the summary. The nuance might vary a bit, but I agree the conclusion was something like this. Yet, I think deprecating Lines 80 to 84 in 3d67907
I have almost zero knowledge about |
It's great to see this issue is closed at last. Thanks @teunbrand for your hard work! |
(Originally commented at #3802 (comment))
In my understanding, there are 2 purposes of
fortify()
.For purpose 1, ggplot2 now provides 2 types of methods, both of which are becoming less important:
geom_sf()
.So, we can and should deprecate (or at least discourage) this type of usages.
On the other hand, for purpose 2, I think
fortify()
still plays a somehow important role. For example,fortify.tbl()
ensurestbl
iscollect()
ed.ggplot2/R/fortify.r
Lines 19 to 24 in 0137a4d
Suggestions
I suggest
fortify.lm()
,fortify.glht()
,fortify.confint.glht()
,fortify.summary.glht()
andfortify.cld()
. Replace examples usingbroom::augment()
andbroom::tidy()
.fortify.<sp-object>
andfortify.map()
after ensuringgeom_sf()
supersedesgeom_map()
.fortify()
toautoplot()
andautolayer()
, and explain how developers of some custom objects can implements these methods so that the users can use ggplot2 to visualize the objects painlessly (Mark geom_map() as superseded #3721).Note that this issue is not very high priority as maintaining
fortify()
doesn't seem a heavy burden, at least at the moment. I filed this issue just because it seems we need some place to discuss to avoid confusion. Anyway, I believe it's a right move to encourage users to use broom and sf.The text was updated successfully, but these errors were encountered: