dplyr adjacency matrix