These generic functions are useful for dealing with
in e.g., data frames.
na.fail returns the object if it does not contain any
missing values, and signals an error otherwise.
na.omit returns the object with incomplete cases removed.
na.pass returns the object unchanged.
1 2 3 4
an R object, typically a data frame
further arguments special methods could require.
At present these will handle vectors, matrices and data frames comprising vectors and matrices (only).
na.omit removes cases, the row numbers of the cases form the
"na.action" attribute of the result, of class
na.exclude differs from
na.omit only in the class of the
"na.action" attribute of the result, which is
"exclude". This gives different behaviour in functions making
na.exclude is used the residuals and predictions are padded to
the correct length by inserting
NAs for cases omitted by
Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole.
options with argument
na.action for setting NA actions;
glm for functions using these.
na.contiguous as alternative for time series.
1 2 3 4 5 6 7 8
We want your feedback!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.