Learn R Programming

pammtools (version 0.7.3)

combine_df: Create a data frame from all combinations of data frames

Description

Works like expand.grid but for data frames.

Usage

combine_df(...)

Arguments

...

Data frames that should be combined to one data frame. Elements of first df vary fastest, elements of last df vary slowest.

Examples

Run this code
combine_df(
  data.frame(x=1:3, y=3:1),
  data.frame(x1=c("a", "b"), x2=c("c", "d")),
  data.frame(z=c(0, 1)))

Run the code above in your browser using DataLab