Learn R Programming

SparkR (version 3.1.2)

hashCode: Compute the hashCode of an object

Description

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

Usage

hashCode(key)

Arguments

key

the object to be hashed

Value

the hash code as an integer

Details

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

Examples

Run this code
# NOT RUN {
hashCode(1L) # 1
hashCode(1.0) # 1072693248
hashCode("1") # 49
# }

Run the code above in your browser using DataLab