This function takes a list of data tables and merges them together
using the specified columns. It uses the merge.data.table
function
from the data.table
package to perform the merge.
Usage
reduce_merge(list_in, by = c("site_id", "time"), all.x = TRUE, all.y = FALSE)
Examples
if (FALSE) { # \dontrun{
# Create example data tables
dt1 <- data.table(a = 1:3, b = 4:6)
dt2 <- data.table(a = 2:4, c = 7:9)
dt3 <- data.table(a = 3:5, d = 10:12)
# Merge the data tables
reduce_merge(list(dt1, dt2, dt3), by = "a")
} # }