R/create_combos.R

create_combos <- function(strings, comb) {
  library(combinat)

  f <- function(x) {
    paste(x, collapse = ", ")
  }

  c <- combn(strings, comb, simplify = T)
  c <- as.data.frame(c, stringsAsFactors=F)
  l <- lapply(c, f)
}
matthewcurrier/miscmatt documentation built on May 15, 2019, 5:50 p.m.