Adding counts to ggmosaic, can this be done simpler?
问题 I would like to make a mosaic plot using the ggmosaic package and add the counts as shown in the example below. The example sort of works, but I find the structure of the code quite ugly. Do you have any suggestions on how I can improve the code, to make it more reusable? Especially the need for storing an early version of the plot in a temporary variable seems wrong compared to what usually can be achieved using ggplot2. library(tidyverse) library(ggmosaic) #> Indlæser krævet pakke: