Learn R Programming

schoolmath (version 0.5.1)

is.positive: Check whether numbers are positive.

Description

Check whether numbers are positive.

Usage

is.positive(x)

Value

A logical vector of the same length as `x`.

Arguments

x

A numeric vector.

Examples

Run this code
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