Raw data looks like:
Restaurant Question rating
McDonalds How was the food? 5
McDonalds How were the drinks? 3
McDonalds How were the workers? 2
Burger_King How was the food? 1
Burger_King How were the drinks? 3
Burger_King How were the workers? 4
Averages looks like:
Question average_rating error
How was the food? 3.13 0.7
How were the drinks? 2.37 0.56
How do I make a plot of points (x = question, y = rating, fill = restaurant) with the raw data, then plot the error bars (ymin/ymax = average_rating ± error) on top of it?
tribbles for convenience:
tribble(
~restaurant, ~question, ~rating,
"McDonalds", "How was the food?", 5,
"McDonalds", "How were the drinks?", 3,
"McDonalds", "How were the drinks?", 2,
"BurgerKing", "How was the food?", 1,
"BurgerKing", "How were the drinks?", 3,
"BurgerKing", "How were the drinks?", 4
)
tribble(
~question, ~average_rating, ~error,
"How was the food?", 3.13, 0.7,
"How were the drinks?", 2.37, 0.56
)

