powered by
Check whether numbers are negative.
is.negative(x)
A logical vector of the same length as `x`.
A numeric vector.
is.negative(3) # FALSE is.negative(0) # FALSE is.negative(-2) # TRUE x <- c(-1, -2, 3.02, 4, -5.2, 6, -7) is.negative(x)
Run the code above in your browser using DataLab