library(qdap)
## Loading required package: ggplot2
## Loading required package: qdapDictionaries
## Loading required package: RColorBrewer
## 
## Attaching package: 'qdap'
## 
## The following object is masked from 'package:base':
## 
##     Filter

A simple lookup table:

(l <- data.frame(a = 1:3, b = factor(paste0("l", 1:3), levels = paste0("l", 
    1:3))))
##   a  b
## 1 1 l1
## 2 2 l2
## 3 3 l3

Result of lookup operation:

(1:3) %l% l
## [1] "l1" "l2" "l3"

Desired result:

l$b
## [1] l1 l2 l3
## Levels: l1 l2 l3

sessionInfo()
## R version 3.1.0 (2014-04-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                 
##  [3] LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8       
##  [5] LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8      
##  [7] LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8          
##  [9] LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8     
## [11] LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] qdap_1.3.5             RColorBrewer_1.0-5     qdapDictionaries_0.0.3
## [4] ggplot2_0.9.3.1        knitr_1.5              ProjectTemplate_0.5-1 
## 
## loaded via a namespace (and not attached):
##  [1] chron_2.3-45        colorspace_1.2-4    dichromat_2.0-0    
##  [4] digest_0.6.4        evaluate_0.5.1      formatR_0.10       
##  [7] gdata_2.13.3        grid_3.1.0          gridExtra_0.9.1    
## [10] gtable_0.1.2        gtools_3.3.1        igraph_0.7.0       
## [13] labeling_0.2        MASS_7.3-29         munsell_0.4.2      
## [16] NLP_0.1-1           openNLP_0.2-2       openNLPdata_1.5.3-1
## [19] parallel_3.1.0      plotrix_3.5-5       plyr_1.8.1         
## [22] proto_0.3-10        Rcpp_0.11.1         RCurl_1.95-4.1     
## [25] reports_0.1.2       reshape2_1.3.0.99   rJava_0.9-6        
## [28] scales_0.2.3        slam_0.1-32         stringr_0.6.2      
## [31] tm_0.5-10           tools_3.1.0         venneuler_1.1-0    
## [34] wordcloud_2.4       xlsx_0.5.5          xlsxjars_0.6.0     
## [37] XML_3.98-1.1