[R] hash - extract key values

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


Hi,

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"
attr(,"package")
[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
‘"hash"’

How can I get the keys for my hash?

thanks!

	[[alternative HTML version deleted]]



More information about the R-help mailing list