I know that with a vector such as
v <- c("MA", "NY", "PA")
names(v) <- c("Massachusetts", "New York", "Pennsylvania")
It is possible to get a value from a name using syntax such as
v["New York"]
But is it possible to get a name from a value (like the PHP key() function)? Thanks.