Description Usage Arguments Value See Also Examples

`sign`

returns a vector with the signs of
the corresponding elements of `x`

, being
1, zero, or -1 if the number is positive,
zero or negative, respectively.

This generalizes the
`sign`

function in the
`base`

package to allow something
other than 0 as the the "sign" of 0.

1 | ```
sign(x, zero=0L)
``` |

`x` |
a numeric vector for which signs are desired |

`zero` |
an |

an `integer`

vector of the
same length as `x`

assuming
values 1, zero and -1, as discussed
above.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.