blob: ba178a20ccab21fdee2e7d9b7a880f848efb6b4b [file] [log] [blame]
<!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 &quot;hashCode&quot;
</code></pre>
<pre><code class="r">hashCode(1.0) # 1072693248
</code></pre>
<pre><code>## Error in eval(expr, envir, enclos): could not find function &quot;hashCode&quot;
</code></pre>
<pre><code class="r">hashCode(&quot;1&quot;) # 49
</code></pre>
<pre><code>## Error in eval(expr, envir, enclos): could not find function &quot;hashCode&quot;
</code></pre>
<hr><div align="center">[Package <em>SparkR</em> version 1.6.3 <a href="00Index.html">Index</a>]</div>
</body></html>