-
Notifications
You must be signed in to change notification settings - Fork 24
Missing values
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 |
You can use the is.na
command to find out if you have missing data.
You can use the complete.cases
and !is.na
commands with subsetting commands to remove missing cases.
If you want to create a data