| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html><head><title>R: Compute the hashCode of an object</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link rel="stylesheet" type="text/css" href="R.css"> |
| |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css"> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| </head><body> |
| |
| <table width="100%" summary="page for hashCode {SparkR}"><tr><td>hashCode {SparkR}</td><td align="right">R Documentation</td></tr></table> |
| |
| <h2>Compute the hashCode of an object</h2> |
| |
| <h3>Description</h3> |
| |
| <p>Java-style function to compute the hashCode for the given object. Returns |
| an integer value. |
| </p> |
| |
| |
| <h3>Usage</h3> |
| |
| <pre> |
| hashCode(key) |
| </pre> |
| |
| |
| <h3>Arguments</h3> |
| |
| <table summary="R argblock"> |
| <tr valign="top"><td><code>key</code></td> |
| <td> |
| <p>the object to be hashed</p> |
| </td></tr> |
| </table> |
| |
| |
| <h3>Details</h3> |
| |
| <p>This only works for integer, numeric and character types right now. |
| </p> |
| |
| |
| <h3>Value</h3> |
| |
| <p>the hash code as an integer |
| </p> |
| |
| |
| <h3>Examples</h3> |
| |
| <pre><code class="r">hashCode(1L) # 1 |
| </code></pre> |
| |
| <pre><code>## Error in eval(expr, envir, enclos): could not find function "hashCode" |
| </code></pre> |
| |
| <pre><code class="r">hashCode(1.0) # 1072693248 |
| </code></pre> |
| |
| <pre><code>## Error in eval(expr, envir, enclos): could not find function "hashCode" |
| </code></pre> |
| |
| <pre><code class="r">hashCode("1") # 49 |
| </code></pre> |
| |
| <pre><code>## Error in eval(expr, envir, enclos): could not find function "hashCode" |
| </code></pre> |
| |
| |
| <hr><div align="center">[Package <em>SparkR</em> version 1.6.3 <a href="00Index.html">Index</a>]</div> |
| </body></html> |