我有两个数据集一和二
数据集一
a b c
111 a 1
112 b 2
113 c 3
114 d 4
115 e 5
数据集二
e d g
222 ss 11
111 ff 22
113 ww 33
114 qq 44
234 dd 55
534 vv 66
我想做左连接
下面是用 SQL 编写的代码,但是当我在 SQLDF 中尝试它时,它显示为错误
proc sql;
create table join1 as
select one.*, two.*
from one left join two
on one.a = two.e;
quit;
With dplyr
, 我们可以用left_join
library(dplyr)
left_join(df2, df1, by = c("e"="a"))
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)