Before we try to locate NAs, we need…

Case 1: How many NAs in a dataset?

We know that there are 3 NAs in the dataset. But it doesn’t tell what columns they reside.

Case 2: How many NAs in each column?

The code will tell the number of NAs each column has. In this example, we only have 4 columns. So the result is not clutter at all. But what if we have 90?

Case 3: How many NAs in each column? Part 2

Let’s add a couple of more lines of code and create the GGPLOT chart.

We will create a data frame that we will use to create the chart. But we need some more prep works.

As you can see, it is not that neat for GGPLOT. Let’s change the name of the column.

Then change the index to be another column.

Now we are ready to plot the chart.