5

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;
0

1 Answer 1

26

With dplyr, we can use left_join

library(dplyr)
left_join(df2, df1, by = c("e"="a"))
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.