A

Admin • 828.03K Points
Coach

Q. How do you create a stacked bar plot in ggplot2 for two categorical variables category1 and category2?

  • (A) geom_bar(aes(x = category1, fill = category2), position = "stack")
  • (B) stacked_bar(category1, category2)
  • (C) geom_bar(mapping = aes(x = category1, fill = category2), stat = "stack")
  • (D) bar_plot_stack(category1, category2)
  • Correct Answer - Option(A)
  • Views: 4
  • Filed under category R Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.