Waffle Pack: Colors mix with zero / 0 in data

An example from my data:

1 99
85 15
8 92
1 99
10 90
0 100

The problem is the last set of numbers: when there is 0, the waffle behaves like 100. Zero seems to be ignored. Is there any way to prevent this?

Work: green = 10, orange = 90

waffle(c(10, 90))

enter image description here

Doesn't work: green = 0, but it renders as green = 100. Each rectangle should be orange

waffle(c(0, 100))

enter image description here

+4
source share
1 answer

Danke for finding this and asking a question! Fixed in 0.6.0.9000:

gridExtra::grid.arrange(
  waffle(c(thing1=0, thing2=100), rows=5),  
  waffle(c(thing1=25, thing2=75), rows=5)
)

enter image description here

+2
source

All Articles