Skip to content

Update docs for fortify #3802

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

Closed
wants to merge 1 commit into from
Closed

Update docs for fortify #3802

wants to merge 1 commit into from

Conversation

bkkkk
Copy link

@bkkkk bkkkk commented Feb 6, 2020

No description provided.

@yutannihilation
Copy link
Member

I agree fortify()'s doc needs to be updated. But, maybe we need to discuss about the current status of fortify() first? I think fortify() is still useful as part of the ggplot2's API; it's just not useful for general use of converting any object to data.frame.

@bkkkk
Copy link
Author

bkkkk commented Feb 7, 2020

@yutannihilation this was brought up in issue #3717, I thought I’d get a legs up on resolving part of it. I agree that the whole fortify family in ggplot2 would benefit from a look-over. The current documentation says that it might get deprecated, I figured until this happens it’s worth pointing people to a “better” solution.

How should we proceed? Maybe create a separate issue from #3717 to hold this discussion?

@yutannihilation
Copy link
Member

Hmm, sorry I think I need some time to answer...

Basically, there are roughly 3 types of objects that fortify() converts.

  1. model object (I think this is why the first argument is named model)
  2. sp object
  3. data.frame-alikes (e.g. grouped_df)

I think category 1 is superseded by broom::augment() (for lm object) and broom::tidy() (for multcomp objects), and category 2 is by geom_sf(). What I said "is still useful as part of the ggplot2's API" above is category 3.

#3717 is only about sp objects, so we need another issue for broader discussion. Let me open a new one later.

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

Successfully merging this pull request may close these issues.

2 participants