is_real | R Documentation |
Is real
is_real(x, include_na = FALSE, verbose = TRUE)
x |
vector. |
include_na |
Logical if 'NA' should also be considered as non-real. |
verbose |
Logical if number of non-real numbers should be printed as message. |
The function checks if a vector contains real numbers and returns FALSE
for NaN
or Inf
values. Input must be a vector. If include_na = TRUE
also NA
values are considered.
vector
x <- c(1, 2, 3, NA, 5, NaN, Inf)
is_real(x)
is_real(x, include_na = TRUE)
y <- c(1, 2, 3, 4, 5, 6, 7)
is_real(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.