sign {math} 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−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

env

[as Environment]

Details

This is an internal generic primitive function: methods can be defined for it directly or via the Math group generic.

Authors

SMRUCC genomics Institute

Value

this function returns data object of type any kind.

clr value class

Examples


[Package math version 2.33.856.6961 Index]