Bar Charts and Pie Charts in R: (R Tutorial 2.1)
In this video, you will learn how to produce bar charts or bar plots and pie charts in R and modify them to better demonstrate your data.
Here we will explain what a bar chart is and when it is appropriate to use bar charts or pie charts for your data. Moreover, you will learn how to produce bar charts in R using "barplot" command, produce frequency table using "table" command, add a title to a bar chart using "main" argument, add labels to the axes using "lab" argument, rotate the values on the y-axis using the "las" argument, change the names or labels appearing under each of the bars using "names.arg" argument, and make bars appear horizontally rather than vertically using "horiz" argument. In this tutorial, we will also show you how to produce a pie chart in R using "pie" command and add a title to it using the "main" argument or a box around it using "box" command.
We recommend using the link below to download the dataset and practice on your own while watching this tutorial.
You can access and download the dataset that was used in this tutorial here: