[R] hash - extract key values

Brian Smith bsmith030465 at gmail.com
Sat Mar 28 00:39:41 CET 2015


I was trying to use hash, but can't seem to get the keys from the hash.
According to the hash documentation ('hash' package pdf, the following
should work:

> hx <- hash( c('a','b','c'), 1:3 )
> class(hx)
[1] "hash"
[1] "hash"
> hx$a
[1] 1
> keys(hx)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘keys’ for signature

How can I get the keys for my hash?


	[[alternative HTML version deleted]]

More information about the R-help mailing list