Summary statistics (mean, median, ...) in type_violin?
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- r
- Bereich
- data-visualization
Rechercherichtung
Beginne mit dem Lesen der Einstiegspunkte type_violin() und type_summary(), reproduziere dann die ToothGrowth-Beispiele aus dem Issue und prüfe die Diskussion zu factor x in #436. Kläre, ob Zusammenfassungen in type_violin() oder type_summary() gehören, einschließlich factor x, beim Gruppieren, bei der Juxtaposition und beim pch-Verhalten. Als abgeschlossen gilt die Aufgabe, wenn die gewählte Schnittstelle Zusammenfassungen an den Violinen ausrichtet und die gemeldeten Fälle abdeckt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is there a sufficiently easy way to add summary statistics like mean or median to violin plots? If not, then maybe this could be added to type_violin() itself?
At first, I thought that type_summary() could be used for this but this is not fully straightforward because it
- does not yet support factor
xvariables, see #436 - handles
byvariables without juxtaposition
Examples:
In the case with numeric x the violin and the points are misaligned (see left panel) because type_violin always treats x as factor and type_summary always expects numeric:
tinyplot(len ~ dose, data = ToothGrowth, fill = 0.2, type = "violin")
tinyplot_add(type = type_summary(median, type = "p"))
Using a factor x is currently not possible in type_summary:
tinyplot(len ~ factor(dose), data = ToothGrowth, fill = 0.2, type = "violin")
tinyplot_add(type = type_summary(median, type = "p"))
## Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, :
## 'range' not meaningful for factors
Only when the numeric values are 1, ..., k then violin and summary points are aligned (center panel):
tinyplot(len ~ as.numeric(as.factor(dose)), data = ToothGrowth, fill = 0.2, type = "violin")
tinyplot_add(type = type_summary(median, type = "p"))
However, even in that case, by groups are handled differently with vs without juxtaposition (right panel):
tinyplot(len ~ as.numeric(as.factor(dose)) | supp, data = ToothGrowth, fill = 0.2, type = "violin", legend = FALSE)
tinyplot_add(type = type_summary(median, type = "p"))
I guess this would indicate that adding some summary option to type_violin directly would be best?
Aside: Setting pch does not seem to be supported in type_summary?
- Vorherrschende Sprache
- R
- Sterne
- 430
- Forks
- 24
- Ø Merge
- 14 Std. 17 Min.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus grantmcdermott/tinyplot
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
grantmcdermott/tinyplot#759 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 67/100
grantmcdermott/tinyplot#664 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
grantmcdermott/tinyplot#663 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Spineplot wishlistOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
grantmcdermott/tinyplot#660 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
grantmcdermott/tinyplot#659 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in grantmcdermott/tinyplot
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bcgov/aqwarnings_shiny#128 ·
-
tech-debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
sagemathinc/sagebrush#3570 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug upkeep
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
phoible.feature() failsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
ropensci/lingtypology#94 ·