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