nan2na: Helper Routine

Description Usage Arguments Value See Also Examples

Description

Replaces non-finite values with NAs in array-like objects.

Usage

1
nan2na(x)

Arguments

x

An array-like object.

Value

Returns x with non-finite values replaced with NAs.

See Also

is.finite, NA.

Examples

1
2
3
4
5
  nan2na(Inf)
  nan2na(rep(c(0, -Inf, Inf), 3))
  nan2na(matrix(c(0, Inf, -Inf, 0), 2, 2))
  nan2na(array(c(0, -Inf, Inf, 1, NaN), dim = c(2, 3, 4)))
  nan2na(ts(rep(c(0, -Inf, Inf), 2), frequency = 5))

cmrutils documentation built on May 1, 2019, 7:59 p.m.

Related to nan2na in cmrutils...