From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

complete.cases

complete.cases

- [Instructor] Incomplete data, data that's missing a field or a value can be really frustrating to work with. It'll throw off calculations and give you outliers that you don't expect. For example, let's take a look at NASA abbreviations and look at lines 66 and 69. You can see that in line 66, it's missing the text explanation for SIM. And in line 69 it's missing the acronym or the abbreviation. So how do you find these missing datas? And the answer is, you using something called Complete Cases. And let's look at how to work that. Complete Cases is pretty easy and straightforward. complete.cases, and then you give it the data set that you want to search through. In this case nasa.abbreviations. And what Complete Cases will return to us is a series of true false values, one for each line in the data set. So if you look down at line 66, the first value is false, and then it's true, true, followed by a false. So that's…

Contents