From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating bar charts

Creating bar charts

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Creating bar charts

- The purpose of graphics, of course, is to actually look at your data and see what is happening. The easiest chart, by far, for the most fundamental kind of data is the bar chart. Simply see how common something is. Now, in another course of learning are, I showed how to create a range of charts using the base graphics in R. That is the default systems. In the course however, I'm going to be demonstrating how to do these graphs using Ggplot2, and I'll start with the bar charts. Let's first install some packages. Pacman and then a then a few other packages. And then let's come down here, and let's get one of the example data sets from R, it's called HairEyeColor. What is some info on that? And it talks about the color of the hair and the color of the eyes of men and women unrolled in some statics classes. We can actually see the data because it's tabular format, so let's look at this. This is the entire data set.…

Contents