1

please do forgive me for potentially asking a really silly question but its really important that the data I am representing in my waffle chart is ordered according to the input of my vector.

I am really struggling to force the graph to not reorder into descending order. Any feedback is welcome.

library(waffle)
x <- c(A = 5, B = 5, C  = 2, D = 3)
waffle(x, rows=5)

Obviously the code above is super basic but I am actually learning this from 0 due to the purpose of the code.

Thanks in advance!

1 Answers1

0

If you change the rows = 3, it will be in the right order:

library(waffle)
x <- c(A = 5, B = 5, C  = 2, D = 3)
waffle(x, rows = 3)

Created on 2022-08-15 by the reprex package (v2.0.1)

Quinten
  • 35,235
  • 5
  • 20
  • 53
  • Thanks so much, unfortunately what I am wanting to use the for is to algorithmically assign space within set dimensions. As such I need the data to not reorder and changing the dimensions of the chart isn't an option sadly/ – James Gouweloos Aug 16 '22 at 05:49