Suppose you have data like
fruits <- data.table(FruitID=c(1,2,3), Fruit=c(\"Apple\", \"Banana\", \"Strawberry\"))
colors <- data.table(ColorID=c(1,2,3,
You could use base R's Reduce to left_join (from dplyr) the list of data.table objects at once given that, you are joining the tables with common column names and willing to avoid setting keys multiple times for data.table objects
library(data.table) # <= v1.9.4
library(dplyr) # left_join
Reduce(function(...) left_join(...), list(fruits,colors,tastes))
# Source: local data table [8 x 6]
# FruitID Fruit ColorID Color TasteID Taste
#1 1 Apple 1 Red 1 Sweeet
#2 1 Apple 1 Red 2 Sour
#3 1 Apple 2 Yellow 1 Sweeet
#4 1 Apple 2 Yellow 2 Sour
#5 1 Apple 3 Green 1 Sweeet
#6 1 Apple 3 Green 2 Sour
#7 2 Banana 4 Yellow NA NA
#8 3 Strawberry 5 Red 3 Sweet
Another option with pure data.table approach as @Frank mentioned
(Note, this requires the keys to be set to fruitID for all the data.table objects)
library(data.table) # <= v1.9.4
Reduce(function(x,y) y[x, allow.cartesian=TRUE], list(fruits,colors,tastes))