(DF <- aggregate(mpg~as.character(carb), mtcars, mean))
new.hash1 <- hash(DF) #numeric outcome
x <- sample(DF[, 1], 20, TRUE)
hash_look(x, new.hash1)
new.hash2 <- hash(DF, "character") #character outcome
x %ha% new.hash2
Run the code above in your browser using DataLab