replace_nonfinite {adaptr} | R Documentation |
Replace non-finite values with other value (finite-OR-operator)
Description
Used internally, helper function that replaces non-finite (i.e., NA
, NaN
,
Inf
, and -Inf
) values according to is.finite()
, primarily used to
replace NaN
/Inf
/-Inf
with NA
.
Usage
a %f|% b
Arguments
a |
atomic vector of any type. |
b |
single value to replace non-finite values with. |
Value
If values in a
are non-finite, they are replaced with b
,
otherwise they are left unchanged.
[Package adaptr version 1.4.0 Index]