is.negative {schoolmath}R Documentation

check whether numbers of a vector are negative

Description

check whether numbers of a vector are negative

Usage

is.negative(x)

Arguments

x

the number or vector to check #'

Value

true or false

Examples

is.negative(3)  # this will return FALSE
is.negative(-2)  # this will return TRUE

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


[Package schoolmath version 0.4.2 Index]