How can I dynamically lookup multiple fields and add by reference using character vector variable as argument. In below case I want to lookup two columns and get ri
Here's the crude way:
myj <- parse(text=paste0("`:=`(",paste0(select,"=i.",select,collapse=","),")")) ID[JN,eval(myj)] # id meta value # 1: 1 1 x # 2: 2 1 v # 3: 3 1 f