powered by
This function checks if x is a ((non)-negative) ((non-)positive) (integer) numeric (vector).
x
is_number( x, int = FALSE, neg = FALSE, non_neg = FALSE, pos = FALSE, non_pos = FALSE )
A logical.
logical
Any R object.
A logical, if TRUE checks if x is an integer.
TRUE
A logical, if TRUE checks if x is negative.
A logical, if TRUE checks if x is non-negative.
A logical, if TRUE checks if x is positive.
A logical, if TRUE checks if x is non-positive.
The function is vectorized.
if (FALSE) { is_number(1, int = TRUE) is_number(pi, int = TRUE) }
Run the code above in your browser using DataLab