EVOLUTION-MANAGER
Edit File: sign.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sign Function</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sign {base}"><tr><td>sign {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sign Function</h2> <h3>Description</h3> <p><code>sign</code> returns a vector with the signs of the corresponding elements of <code>x</code> (the sign of a real number is 1, 0, or <i>-1</i> if the number is positive, zero, or negative, respectively). </p> <p>Note that <code>sign</code> does not operate on complex vectors. </p> <h3>Usage</h3> <pre> sign(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a numeric vector</p> </td></tr> </table> <h3>Details</h3> <p>This is an <a href="InternalMethods.html">internal generic</a> <a href="Primitive.html">primitive</a> function: methods can be defined for it directly or via the <code><a href="groupGeneric.html">Math</a></code> group generic. </p> <h3>See Also</h3> <p><code><a href="MathFun.html">abs</a></code> </p> <h3>Examples</h3> <pre> sign(pi) # == 1 sign(-2:3) # -1 -1 0 1 1 1 </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>