hashCode {SparkR}R Documentation

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

Details

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

Value

the hash code as an integer

Examples

hashCode(1L) # 1
## Error in eval(expr, envir, enclos): could not find function "hashCode"
hashCode(1.0) # 1072693248
## Error in eval(expr, envir, enclos): could not find function "hashCode"
hashCode("1") # 49
## Error in eval(expr, envir, enclos): could not find function "hashCode"

[Package SparkR version 1.4.0 Index]