This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/sign.html
sign {base}R Documentation

Sign Function

Description

sign returns a vector with the signs of the corresponding elements of x (the sign of a real number is 1, 0, or -1 if the number is positive, zero, or negative, respectively).

Note that sign does not operate on complex vectors.

Usage

sign(x)

Arguments

x

a numeric vector

See Also

abs


[Package base version 0.60 ]