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

View source: R/functions.R

is.positiveR Documentation

check whether numbers of a vector are positive

Description

check whether numbers of a vector are positive

Usage

is.positive(x)

Arguments

x

the number or vector to check #'

Value

true or false

Examples

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)


schoolmath documentation built on Aug. 21, 2023, 5:08 p.m.