insightsengineering / insightsengineering/ggplot2.utils

Try simple extension of `facet_grid` to remove specific levels of factor from plot

Aperta
#3 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
R
Stelle
9
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Motivation: If we want to compare the BEP vs. All population using the `margin = TRUE` in `facet_grid()` works. However, it also gives us the non-BEP facets. We might not need/want to show this.

Idea: We could inherit from `facet_grid` and add additional argument `droplevels` which could be a list with one element per factor used, which can specify which levels not to have in the final plot. See https://cran.r-project.org/web/packages/ggplot2/vignettes/extending-ggplot2.html

Provenance:
```
Creator: Sabanes Bove, Daniel {MDBR~Basel}
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.