How to Apply the sign() Function in R (Example Code)
In this post you’ll learn how to find out if a numeric value is positive or negative in the R programming language.
Example: Return Sign of Numeric Value
sign(-1:3) # Applying the sign function in R # -1 0 1 1 1 |
sign(-1:3) # Applying the sign function in R # -1 0 1 1 1