Learn R Programming

schoolmath (version 0.4)

is.positive: check wether numbers of a vector are positive

Description

This function checks wether the numbers of a vector are positive. It returns TRUE/FALSE.

Usage

is.positive(x)

Arguments

x

A number or vector to be checked

See Also

is.negative is.real.positive

Examples

Run this code
# NOT RUN {
is.positive(-3)   # this will return FALSE
is.positive(2)  # this will return TRUE

x <- c(-1, -2, 3.02, 4, -5.2, 6, -7)
is.positive(x)

# }

Run the code above in your browser using DataLab