This function performs checks inspired on merge.data.table: it detects errors
if x and/or y have no columns
if x and/or y contain duplicate column names
Examples
if (FALSE) { # \dontrun{
# Check passing with no errors
library(data.table)
x1 = data.table(id = c(1L, 1L, 2L, 3L, NA_integer_),
t = c(1L, 2L, 1L, 2L, NA_integer_),
x = 11:15)
y1 = data.table(id = c(1,2, 4),
y = c(11L, 15L, 16))
joyn:::check_xy(x = x1, y=y1)
} # }