Learn R Programming

adaptr (version 1.4.0)

replace_nonfinite: 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

Value

If values in a are non-finite, they are replaced with b, otherwise they are left unchanged.

Arguments

a

atomic vector of any type.

b

single value to replace non-finite values with.