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
- Simulation is important topic for statistical applications and scientific purposes in gen
- Operations can be done on matrices in two fashions: Element-wise : where operations perfo
- Like every other programing language, R have control structures that allow you control th
- R is an open source programming language and software environment for statistical computi
- Microsoft Excel is a powerful software that have been used my end users and professionals
- FunctionsFunctions are just like what you remember from math class. Most functions are in
Subscribe to:
Post Comments (Atom)
EmoticonEmoticon