A and B may be data.frame or data.table.
If A is a data.table it will be modified by reference.
If A is a data.frame a modified data.frame is returned.
merge_append(A, B, by_vars, new_vars, overwrite = TRUE, first_match = TRUE)If A was a data.frame, returns modified data.frame; if A was data.table returns invisible(NULL).
left table (data.frame or data.table) — rows preserved/order preserved
right table (data.frame or data.table) — must contain by_vars and new_vars
character vector of join columns (e.g. c("id","tstart","tstop"))
character vector of column names from B to append to A
logical: if TRUE, overwrite any existing columns in A with same avar names (default TRUE)
logical: if TRUE use first match when B has duplicate keys; if FALSE, error on duplicates