I think I might have got it... Check it?
pgather <-
data.frame(rnames = rownames(l2$P), round(l2$P,3) ) %>%
gather(., names, value, -rnames) %>%
mutate(type = "p")
rgather <-
data.frame(rnames = rownames(l2$r), round(l2$r,3) ) %>%
gather(., names, value, -rnames) %>%
mutate(type = "r")
ngather <-
data.frame(rnames = rownames(l2$n), round(l2$n,3) ) %>%
gather(., names, value, -rnames) %>%
mutate(type = "n")
#then we put everything in a single dataframe
# and spread it back out by names
bind_rows(pgather, rgather, ngather) %>%
spread(., names, value)