# NOT RUN {
# Example 1. A and B have different factor levels
A <- factor(c("A","E","F"))
dat <- data.frame(trt = factor(c("E","F","G")),
val = c(4,2,0))
vlookup(A,dat, "trt", "val")
# }
Run the code above in your browser using DataLab