R/expand_list.R

Defines functions expand_list

Documented in expand_list

#' Expand (cross) lists
#'
#' The same as purrr::cross, but doesn't require an extra list()
#' @param ... Dots
#' @examples
#' plnr::expand_list(
#'   a = 1:2,
#'   b = c("a", "b")
#' )
#' @export
expand_list <- function(...) {
  dots <- list(...)
  purrr::cross(dots)
}

Try the plnr package in your browser

Any scripts or data that you put into this service are public.

plnr documentation built on Nov. 23, 2022, 5:06 p.m.