For achieving your goal, you can use hash::invert in R programming, refer to the following code:
invert(H)[["cat"]]
[1] "animals"
And the above code will also works for multiple hashes with the same value.
H[["mammals"]] = c("cat","dog","human")
invert(H)[["cat"]]
[1] "animals" "mammals"