3
How can I make a graph with the data below comparing the two areas? I would like to leave the Cerrado bars on the side of the Bosque bars. I tried many times, but I could only build the chart for one of the areas. Here’s my data:
dados <- structure(list(Ordem = structure(c(7L, 5L, 2L, 8L, 10L, 6L, 9L,
3L, 4L, 1L, 11L), .Label = c("Blattodea", "Coleoptera", "Collembola",
"Dermaptera", "Diptera", "Hemiptera", "Hymenoptera", "Lepidoptera",
"Neuroptera", "Orthoptera", "Psocoptera", "Total"), class = "factor"),
Bosque = c(192L, 135L, 23L, 9L, 11L, 33L, 0L, 26L, 1L, 3L,
1L), Cerrado = c(128L, 130L, 13L, 9L, 1L, 35L, 3L, 23L, 0L,
3L, 0L)), row.names = c(NA, 11L), class = "data.frame")
And now there’s the
tidyr::pivot_longer
.– Rui Barradas