ggmosaic

Adding counts to ggmosaic, can this be done simpler?

纵饮孤独 提交于 2020-06-08 07:29:07
问题 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:

Changing tick marks on geom_mosaic plot

我是研究僧i 提交于 2019-12-13 03:39:25
问题 I have the following dataset in R, which I want to make into a mosaic plot using ggplot2 and ggmosaic. type variable count residuals residcut residround see.m aca 44 4.380270 high 4 see.nm aca 26 -3.063712 low -3 see.m conv 48 -1.562652 low -2 see.nm conv 135 1.092973 medium 1 see.m fic 27 -2.194561 low -2 see.nm fic 98 1.534951 medium 2 see.m news 17 1.504522 medium 2 see.nm news 19 -1.052315 low -1 I am using the following code, which gives me the plot below : ggplot(see.reg2) + geom_mosaic

ggmosaic error message: default method not implemented for type 'list'

柔情痞子 提交于 2019-12-12 06:00:23
问题 Trying to create a heatmap using ggmosaic , I keep getting the error Error in is.finite(x) : default method not implemented for type 'list' Searching for that error message, one answer was that "This error is because the is.infinite() and the is.finite() functions are not implemented with a method for data.frames." But not a useful solution in the question nor about ggmosaic Even the example from the vignette fails for me. ggplot(data = NHANES) + geom_mosaic(aes(weight = Weight, x = product