0

I would like to create a diagram in R as shown below (right) where i can show the distribution of my dummy variable, reservation (1) or walk-in (0), as separate.

This in order to do a correct analysis of the Mann-Whitney U test.

I want to make the right diagram

I want to make the right diagram

Who knows how to do this?

M--
  • 25,431
  • 8
  • 61
  • 93
Emily
  • 1
  • 2
  • 2
    https://stackoverflow.com/questions/3541713/how-to-plot-two-histograms-together-in-r?rq=1 – rawr Jul 05 '17 at 14:54
  • You should at least try something first. Then ask for help. – sconfluentus Jul 05 '17 at 15:02
  • Maybe plot on both sides of xaxis? See [here](https://stackoverflow.com/questions/6999144/how-do-you-create-a-bar-plot-for-two-variables-mirrored-across-the-x-axis-in-r) for an example. – zx8754 Jul 05 '17 at 15:13
  • @rawr linked post doesn't solve the problem, when 2 histograms are in complete overlap. – zx8754 Jul 05 '17 at 15:21

0 Answers0