A common task in preparing you data is to remove missing values(NAs). One way to do that is to retrieve a vector of the missing values in your data, and then filter them out from your structure.
If you want to filter out the missing values from more than one vector , you can use complete.cases() to get the indices that contains good data in both vectors.
Here good will contain TRUE only for indices that hold good data in both vectors; FALSE otherwise. complete.cases() works with data frames also. In that case it removes any row that contains NA in any column.The returned data frame will not contain any NAs.
Stay tuned for more R notes.
Saturday, 12 January 2013
Introduction to R – Removing missing values

Artikel Terkait
- FunctionsFunctions are just like what you remember from math class. Most functions are in
- R includes several packages for visualizing data: graphics contains plotting functions f
- There are many functions that read/write data in R and export it files read.table, read.c
- Like every other programing language, R have control structures that allow you control th
- In this post we will talk about native debugging support in R. Mostly, you start debuggin
- Microsoft Excel is a powerful software that have been used my end users and professionals
Subscribe to:
Post Comments (Atom)
EmoticonEmoticon