Solution: Create Plots with Numerical Data

Let's look at the solution of the previous exercise.

We'll cover the following


The primary goal here is to look at the values in our numeric vectors. If we look at the help file of the hist() function (which can be done by typing ?hist in the previous lesson’s code terminal), we see that there are lots of options. Those are optional except for x, which is the vector of values we want to plot. In our data frame, we can access our numeric vectors with the $ operator.

For example, if we’re going to plot a histogram of the vector of sizes that we measured in our control diet, we type the following:

Get hands-on with 1200+ tech skills courses.