replace_nonfinite: Replace non-finite values with other value...

replace_nonfiniteR 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.


adaptr documentation built on May 29, 2024, 7:48 a.m.