Learn R Programming

hash (version 2.2.6.3)

keys: Returns key(s) from a hash

Description

Returns the key(s) from a hash

Usage

keys(x)

# S3 method for hash names(x)

Value

keys

A vector of type character

Arguments

x

A hash object.

Author

Christopher Brown

Details

Returns the character vector containing the keys of a hash object.

See Also

See Also hash.

Examples

Run this code

  h <- hash( letters, 1:26 )
  keys(h)  # letters

  names(h) # same

Run the code above in your browser using DataLab