sign_no_zero: Get binary sign of a variable, or array

Description Usage Arguments Value See Also Examples

Description

Get binary sign of a variable, or array

Usage

1

Arguments

x

a vector or array

Value

a vector or array telling if each element of x is greater than or equal to zero. This array will be of the same dimension as x, but with elements -1 for negative values of x, and elements +1 for positive values of x

See Also

sign

Examples

1
sign_no_zero(-2:2) #returns -1 -1  1  1  1 

neuroconductor/ggBrain documentation built on Nov. 14, 2020, 12:27 a.m.