Skip to content

Update docs for fortify - #3802

Closed
bkkkk wants to merge 1 commit into
tidyverse:masterfrom
bkkkk:fix/docs/fortitfy
Closed

bkkkk wants to merge 1 commit into
tidyverse:masterfrom
bkkkk:fix/docs/fortitfy

Conversation

@bkkkk

@bkkkk bkkkk commented Feb 6, 2020

Copy link
Copy Markdown

No description provided.

@yutannihilation

Copy link
Copy Markdown
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

bkkkk commented Feb 7, 2020 •

Copy link
Copy Markdown
Author

@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
Copy Markdown
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.

@bkkkk bkkkk closed this Sep 8, 2021
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