Question: If I have 3 datasets:

```
**df1**
ID AMOUNT-2008
1  50
2  60
3  70 
4  80
6  80

  **df2**
    ID AMOUNT-2009
    2  50
    3  60
    4  70 
    5  80

  **df3**
    ID AMOUNT-2010
    6  60
    7  70
    2  80 
    8  90

```

How would I join them so that the result would be

```
 **Combined**
  ID AMOUNT-2008   AMOUNT-2009   AMOUNT-2010
    1  50           0                
    2  60           50             80
    3  70           60             
    4  80           70             
    5               80             
    6  80                          60
    7                              70
    8                              90

```

left join doesnt seem to work because if the ID doesnt exist in one of the data frames, then it wont let me add a new row with the ID
PS sorry about formatting, still getting the hand of this

Answer: 
One method is a `full join` and I would suggest the `using` clause as well:

```
select id, df1.amount_2008, df2.amount_2009, df3.amount_2010
from df1 full join
     df2
     using (id) full join
     df3
     using (id);

```
Just use `dplyr::full_join` twice or `dplyr::full_join` with `Reduce`:

```
df1 <- read.table(text = "ID AMOUNT-2008
                          1  50
                          2  60
                          3  70 
                          4  80
                          6  80", header=TRUE)

df2 <- read.table(text = "ID AMOUNT-2009
                          2  50
                          3  60
                          4  70 
                          5  80", header=TRUE)

df3 <- read.table(text="ID AMOUNT-2010
                        6  60
                        7  70
                        2  80 
                        8  90", header=TRUE)

dplyr::full_join(dplyr::full_join(df1, df2), df3)
Reduce(dplyr::full_join, list(df1, df2, df3))

```

This gives:

```
ID AMOUNT.2008 AMOUNT.2009 AMOUNT.2010
1  1          50          NA          NA
2  2          60          50          80
3  3          70          60          NA
4  4          80          70          NA
5  6          80          NA          60
6  5          NA          80          NA
7  7          NA          NA          70
8  8          NA          NA          90

```