knitr::opts_chunk$set(echo = TRUE)

R Markdown

library(Ipaper)
## example-01
d1 <- data.table(x = c(1, 2, 3, 4, 5), y = c(4, 3, 5, 2, 1))
d2 <- data.table(x = c(1, 6, 3, 4), z = c(10, 9, 8, 7))

print(d1)
print(d2)
merge(d1, d2, by = "x")
info <- match2(d1$x, d2$x)
print(info)

cbind(d1[info$I_x], d2[info$I_y])


cuijj6/obstetrics documentation built on Sept. 7, 2020, 12:04 a.m.