I would like to rename my labels (both "Bildungsgrad" and "Bundestagswahl 2021" after having them situated via labeling_list. Currently, they just have there numeric values (see attached picture)Plot I tried both
set_labels=list(Bildungsgrad = c("Anderer Abschluss", "Qualifizierter Hauptschulabschluss", "Mittlere Reife", "Fachabitur/Allgemeines Abitur", "Universitätsabschluss")) and
vnames <- list(set_varnames = c(StrategischeWahl2021="Strategische Wähler 2021"))
lnames <- list(Bildungsgrad = c("Anderer Abschluss", "Qualifizierter Hauptschulabschluss", "Mittlere Reife", "Fachabitur/Allgemeines Abitur", "Universitätsabschluss"))
labeling_args=vnames, set_labels=lnames
My entire code is here:
Test <- Deskriptive_Statistik
mosaic(~ Bildungsgrad + StrategischeWahl2021,
direction = c("v", "h"),
data = Test,
shade = TRUE,
labeling = (labeling_list))
margins = c(bottom = 5)
Thank you very much ;)
I now fixed it via a not really elegant solution, but it works. I just renamed the Variable-Name, so now it acts like a legend. Picture