I am creating KeyValue pair as below:
Market <- c("ESA", "CLA", "GCA", "DXA")
Market_ID <- c(11,13,14,17)
MI_KV <- setNames(as.list(Market), Market_ID)
MI<-13
When I do the following, I get the desired output:
> MI_KV$`13`
[1]"CLA"
But When I do the following, I get NULL value as output:
> MI_KV$MI
NULL
How do I retrieve the value using the above command as MI will be dynamic?