Learn R Programming

stocks (version 1.1.1)

nonpositives: 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

Usage

nonpositives(x)

Arguments

x
Numeric vector.

Value

Numeric vector.

Details

NA

References

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

See Also

positives, negatives, nonnegatives

Examples

Run this code
# Generate 10 values from standard normal distribution
x <- rnorm(10)

# Find non-positive values
nonpositives(x)

Run the code above in your browser using DataLab