nonpos {stocks}R Documentation

Return Non-Positive Elements of a Numeric Vector

Description

Simply returns the non-positive elements of some input vector x. Defined as x[which(x <= 0)].

Usage

nonpos(x)

Arguments

x

Numeric vector.

Value

Numeric vector.

Author(s)

Dane R. Van Domelen

References

Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.

See Also

pos, neg, nonneg

Examples

# Generate 10 values from standard normal distribution
set.seed(123)
x <- rnorm(10)

# Find non-positive values
nonpos(x)

[Package stocks version 1.1.2 Index]