keys(x)## S3 method for class 'hash':
keys(x)
## S3 method for class 'hash':
names(x)
keys(x) <- value
keys
and names
, a character vector of key
names For the replacement methods keys<-
, a hash
object with the keys renamed to value
setkeys
: rename specific hash keys.
hash
: hash objecth <- hash( letters, 1:26 )
keys(h) # letters
names(h) # same
#' Rename keys
# keys( h ) <- rev( keys(h) )
Run the code above in your browser using DataLab