Home > front end >  Can I make a bar plot, where each bar represents a column in a data frame?
Can I make a bar plot, where each bar represents a column in a data frame?

Time:11-08

I would like to make a bar plot, where each bar is represented by one of the three columns in this data frame. The 'size' of each bar depends on the sum created by adorn_totals.

Reproducible example:

library(janitor)

test_df <- data.frame(
  a = c(1:5),
  b = c(1:5),
  c = c(1:5)
  ) %>% 
  adorn_totals(where = 'row', tabyl = c(a, b, c))

I tried a solution that has previously been posted, but that didn't work: Link to the post: enter image description here

  • Related