merge_list | R Documentation |
Function that finds a set of common columns in a list of tables, and merges the tables on these columns.
merge_list(lst)
lst |
List of tables to be merged. List object. |
data.table
object
# Merge list of three tables with different common variables
## Not run:
A <- data.table::data.table(month=month.name,year=rep(1991:1992,each=12),A=rnorm(24))
B <- data.table::data.table(year=c(1991,1992),B=rbeta(2,1,1))
C <- data.table::data.table(month=month.name,C=runif(12))
out_1 <- merge_list(list(A,B,C))
out_1
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.