Categories
Mastering Development

R Hash – get Key based on value

H = hash()
H[["numbers"]] = c(1,2,3)
H[["alpha"]] = c("x","y","z")
H[["animals"]] = c("cat","dog")

Now i want to get “animals” using “cat”.
get the key of the hash based on the value.

Leave a Reply

Your email address will not be published. Required fields are marked *