Skip to content

Instantly share code, notes, and snippets.

View rdinnager's full-sized avatar

Russell Dinnage rdinnager

View GitHub Profile

Is there an easy way to convert a named list into a dataframe, preserving the elements of the list in a "list-column"?

library(dplyr)
library(magrittr)

## make a random matrix
rand_mat <- function() {
  Nrow <- sample(2:15,1)

Ncol <- sample(2:15,1)