nonFinToVal: Replace non finite values with a user given value in a vector

Description Usage Arguments Value Examples

View source: R/valuefunctions.R

Description

This function replaces all non finite values in a vector with a value provided by the user. NA, NaN, Inf are all examples of non finite values.

Usage

1
nonFinToVal(x, y = 0)

Arguments

x

the vector to replace all non finite values in

y

the value to replace the non finite values with

Value

a new vector with all non finite values replaced by y

Examples

1
2
nonFinToVal(c(NA, 3:5, NA, NA, 4, 4, 10, NA))
nonFinToVal(c(NA, 3:5, NA, NA, 4, 4, 10, NA), 3)

DoktorMike/datools documentation built on Feb. 28, 2021, 8:39 a.m.