Description Usage Arguments Details Value
Replace NA, Inf, and NaN values in single vectors.
1 2 3 4 5 |
x |
The vector in which to replace the special value. |
replacement |
The replacement value. |
dplyr::coalesce
has similar functionality, but is meant to deal with parallel vectors (similar to many SQL-systems's COALESCE
function).
These calls are simpler and are only intended to replace values in basic vectors.
NA2
uses is.na
, Inf2
uses is.infinite
, and NaN2
uses is.nan
as the predicate function.
A new vector with the special value replaced by the replacement value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.