a b c d
0 6 5 8
1 7 5 9
2 2 3 0
e b c
4 7 3
1 7 5
6 7 5
3 2 3
a b c d count(e) sum(e)
0 6 5 8 0 0
1 7 5 9 2 7
2 2 3 0 1 3
a b c d e
0 6 5 8 NA
1 7 5 9 1
1 7 5 9 6
2 2 3 0 3
NA 7 3 NA 4