signum | R Documentation |
Classify the sign of the elements of a vector
signum(x, epsilon = 1e-05)
x |
vector of values to test |
epsilon |
magnitude threshold |
Calculates the sign of the elements of then vector x, except that values less than epsilon in magnitude are rounded down to zero.
Returns a vector with elements +1,0 or -1.
signum(c(-40,-3,-0.1E-8,0,2,5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.