I have a `data.table` that lists `clientID` and every `month` of. the year.

```
> summaryClaims
   clientID monthOfClaim      amt
1:        A            5  5292.19
2:        A            6   287.89
3:        B            2  9469.10
4:        C            6 16607.33

```

Then I have a second `data.table` that lists `clientID` and `month` in which a payment occur. This table only lists months in which a payment occurred.

```
claimsCombo
    clientID monthOfClaim
 1:        A            1
 2:        A            2
 3:        A            3
 4:        A            4
 5:        A            5
 6:        A            6
 7:        A            7
 8:        A            8
 9:        A            9
10:        A           10
11:        A           11
12:        A           12
13:        B            1
14:        B            2
15:        B            3
16:        B            4
17:        B            5
18:        B            6
19:        B            7
20:        B            8
21:        B            9
22:        B           10
23:        B           11
24:        B           12
25:        C            1
26:        C            2
27:        C            3
28:        C            4
29:        C            5
30:        C            6
31:        C            7
32:        C            8
33:        C            9
34:        C           10
35:        C           11
36:        C           12

```

I want to get a table with cumulative payments for the last 4 months. However, something strange is happening. I am getting `NA` for months in which a payment occurred. Why?

```
>   claimsMonthly <- merge(claimsCombo, summaryClaims, by = c("clientID", "monthOfClaim"), all.x = TRUE)
> claimsMonthly
    clientID monthOfClaim amt
 1:        A            1  NA
 2:        A            2  NA
 3:        A            3  NA
 4:        A            4  NA
 5:        A            5  NA
 6:        A            6  NA
 7:        A            7  NA
 8:        A            8  NA
 9:        A            9  NA
10:        A           10  NA
11:        A           11  NA
12:        A           12  NA
13:        B            1  NA
14:        B            2  NA
15:        B            3  NA
16:        B            4  NA
17:        B            5  NA
18:        B            6  NA
19:        B            7  NA
20:        B            8  NA
21:        B            9  NA
22:        B           10  NA
23:        B           11  NA
24:        B           12  NA
25:        C            1  NA
26:        C            2  NA
27:        C            3  NA
28:        C            4  NA
29:        C            5  NA
30:        C            6  NA
31:        C            7  NA
32:        C            8  NA
33:        C            9  NA
34:        C           10  NA
35:        C           11  NA
36:        C           12  NA

```

DATA:

```
structure(list(clientID = c("A", "A", "A", "A", "A", "A", "A", 
"A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", 
"B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", 
"C", "C", "C"), monthOfClaim = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 
11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 
6, 7, 8, 9, 10, 11, 12)), row.names = c(NA, -36L), class = c("data.table", 
"data.frame")

structure(list(clientID = c("A", "A", "B", "C"), monthOfClaim = c(4.99999999999909, 
6.00000000000091, 1.99999999999909, 6.00000000000091), amt = c(5292.19, 
287.89, 9469.1, 16607.33)), row.names = c(NA, -4L), class = c("data.table", 
"data.frame")

```