Closed ASarafoglou closed 2 years ago
In R impossible number are represented with the symbol NaN. Use the function is.nan() to check if values are impossible numbers.
R
NaN
is.nan()
value <- 0/0 value is.nan(value)
In R infinity is represented with the symbol Inf. Use the function is.infinite() to check if values are infinite.
Inf
is.infinite()
value <- 1/0 value is.infinite(1/0) # negative infinity value <- -1/0 value is.infinite(1/0)
These are great, thanks!
NaN
An impossible number that is "Not a number"In
R
impossible number are represented with the symbolNaN
. Use the functionis.nan()
to check if values are impossible numbers.Inf
A value representing positive infinityIn
R
infinity is represented with the symbolInf
. Use the functionis.infinite()
to check if values are infinite.