pos {stocks} | R Documentation |
Simply returns the positive (or non-negative) elements of some input vector
x
. Defined as x[which(x > 0)]
or x[which(x >= 0)]
depending
on include.zero
input.
pos(x, include.zero = FALSE)
x |
Numeric vector. |
include.zero |
If |
Numeric vector.
Dane R. Van Domelen
Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.
# Generate 10 values from standard normal distribution set.seed(123) x <- rnorm(10) # Find positive values pos(x)