R tutorial: Lattice tutorial, how to make a grouped bar chart, part 1

preview_player
Показать описание
Here's my tutorial on how to make a lattice grouped bar chart, or bar plot. In this video, you'll learn how to make a grouped bar chart that shows the number of Prix de Lausanne ballet dances that were choreographed by men, and the number that were choreographed by women.

Steps:
1. Put your data into Excel into the right format. This is a bit tricky.
2. Import lattice into R
4. Set up the x, y, and and groups in the bar chart. Make sure to make horizontal = FALSE, or you'll get a horizontal bar chart.

Ta da! You have the core of a barchart. Next video, you'll learn how to make it look nice.

IDE: RStudio
Main packages: lattice
Main function: barchart
Рекомендации по теме
Комментарии
Автор

Finally something that works because you explained your data structure. Thank you!

jonas
Автор

Lattice barchart part starts at 13:50 . You're welcome ^_^

asmaamannasaheb
Автор

Thank you very much!
You can transform the Year Data to factor Data by just writing as.factor(Year) in your barchart command.

ostfreesland-qm
Автор

Can you explain me how can I insert legend with this example, please? Thanks.

aniurusmaya
Автор

could not find function "Barchart", this is my probleme :( waiting for your answer

kamelrahmani