In R, I have multiple very large (on the order of 140e6) lists of IP addresses. There are many overlap IPs between the multiple lists. I'd like to create a data frame or data table that contains the ip address as the rowname (without duplicates) and the list names as the columns and a 0 or 1 that indicates whether the ip exists in that list. 

For example, we have the following two lists, with some % intersection between the two.

```
a <- c("192.168.0.1","192.168.0.2","192.168.0.3","192.168.0.4","192.168.0.5","192.168.0.6","192.168.0.7","192.168.0.8","192.168.0.9","192.168.0.10")
b <- c("192.168.1.1","192.168.1.2","192.168.1.3","192.168.1.4","192.168.0.5","192.168.0.6","192.168.0.7","192.168.0.8","192.168.0.9","192.168.0.10")

```

What I would like is this:

```
             a b
192.168.0.1  1 0
192.168.0.2  1 0
192.168.0.3  1 0
192.168.0.4  1 0
192.168.0.5  1 1
192.168.0.6  1 1
192.168.0.7  1 1
192.168.0.8  1 1
192.168.0.9  1 1
192.168.0.10 1 1
192.168.1.1  0 1
192.168.1.2  0 1
192.168.1.3  0 1
192.168.1.4  0 1

```

I have tried using reshape2, tidyr, model.matrix, intersect and good ol' for loops. I've found a few examples of people creating dummy matrices from data frames, but not with the vector name as the column and the value as the rowname, and not with duplicates.