Skip to content
christophergandrud edited this page Aug 1, 2012 · 2 revisions

Incomplete Entry

We often have incomplete data. This is called missing data. Usually if an observation is missing, R includes the special value NA. For example,

Country Population (in millions)
Albania 2,800,000
Botswana NA
Cambodia 14,800,000

Find Missing Data with is.na

You can use the is.na command to find out if you have missing data.

Remove Missing Data

You can use the complete.cases and !is.na commands with subsetting commands to remove missing cases.

complete.cases

If you want to create a data

!is.na

Clone this wiki locally