I have two dataset one and two
dataset one
a b c
111 a 1
112 b 2
113 c 3
114 d 4
115 e 5
dataset two
e d g
222 ss 11
111 ff 22
113 ww 33
114 qq 44
234 dd 55
534 vv 66
I want to do a left join
Below is the code written in SQL but when i try it in SQLDF it showing as error
proc sql;
create table join1 as
select one.*, two.*
from one left join two
on one.a = two.e;
quit;
With dplyr
, we can use left_join
library(dplyr)
left_join(df2, df1, by = c("e"="a"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With