values {hash} | R Documentation |
Extract values
from a hash
object. This is a pseudo-
accessor method that returns all of the values without requiring a
key. It is identical to h[[ keys(h) ]]
.
For details about hash accessors, please see hash-class
values(x, ...)
x |
The hash from where the values retrieved |
... |
Arguments passed to sapply |
The values
method returns the values from a hash in the
simplest form available.
Values are extracted using sapply so if the values are coerced
to a vector or matrixs if possible and elements are named after
the corresponding key. If the values are of different types or
of a complex class than a named list is returned. Supply
arguments to sapply
can force this case.
Please see details for which value will be returned:
vector |
Vector with the type as the values of the hash |
list |
list containing the values of the hash |
Christopher Brown
none
h <- hash( letters, 1:26 ) values(h) # 1:26 values(h, simplify = FALSE ) values(h, USE.NAMES = FALSE )