# create new dictionary
d <- dict()
# assign an item whose key is c(2:3)
d[[ c(2,3) ]] <- "Test"
# retrieve the element
d[[ c(2,3) ]]
# get will return NULL if the key is not in the dictionary
# (but you can also set the second argument to specify the default value)
d$get("?")
Run the code above in your browser using DataLab