Let's say I have these two datasets
df = data.frame(ID = 1:10, Num = 101:110)
g = data.frame(ID = 1:5, SSE = 1:5)
I want to make the output as follows
   ID Num SSE
1   1 101   1
2   2 102   2
3   3 103   3
4   4 104   4
5   5 105   5
6   6 106  NA
7   7 107  NA
8   8 108  NA
9   9 109  NA
10 10 110  NA
I tried using %in% but didn't work. Thanks.
 
    