How do I combine two columns and replace missing values in R? 

Let's say I have a data.frame: 

```
D = data.frame(a = c(1,NA,3), b = c(1,2,NA))

```

Looks like this

```
   a  b
1  1  1
2 NA  2
3  3 NA

```

How would I get it to look like this: 

```
  c
1 1
2 2
3 3

```