hashCode: Compute the hashCode of an object

Description Usage Arguments Details Value Note Examples

View source: R/utils.R

Description

Java-style function to compute the hashCode for the given object. Returns an integer value.

Usage

1
hashCode(key)

Arguments

key

the object to be hashed

Details

This only works for integer, numeric and character types right now.

Value

the hash code as an integer

Note

hashCode since 1.4.0

Examples

1
2
3
4
5
6
## Not run: 
hashCode(1L) # 1
hashCode(1.0) # 1072693248
hashCode("1") # 49

## End(Not run)

SparkR documentation built on June 3, 2021, 5:05 p.m.