There might be times where you have a data frame and you want to remove all the rows that might contain an NA value, for that the function complete.cases is the best option.
We will use the first 6 rows of the airquality dataset to make an example since it already has NAs
x <- head(airquality)
...