| naOmit | R Documentation |
This function removes NAs from input vector, in contrast to na.omit this function has no slot for removed elements.
naOmit(x, silent = FALSE, debug = FALSE, callFrom = NULL)
x |
(vector or matrix) data to check & remove |
silent |
(logical) suppress messages if |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allows easier tracking of messages produced |
Resulting objects from naOmit are smaller in size and subsequent code execution (on large vectors) may be faster (in particular if many NAs get encountered).
Note : This function behaves differently to na.omit with input other than plain vectors. Will not work with data.frames !
This function returns a vector without NAs (matrix input will be transformed to vector). Returns NULL if input consists only of NAs.
na.fail, na.omit
aA <- c(11:13,NA,10,NA);
naOmit(aA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.