Learn R Programming

glmmrBase (version 0.10.5)

nest_df: Generate nested block structure

Description

Generate a data frame that nests one data frame in another

Usage

nest_df(df1, df2)

Value

data frame

Arguments

df1

data frame

df2

data frame

Details

For two data frames `df1` and `df2`, the function will return another data frame that nests `df2` in `df1`. So each row of `df1` will be duplicated `nrow(df2)` times and matched with `df2`. The values of each `df2` will be unique for each row of `df1`

Examples

Run this code
nest_df(data.frame(t=1:4),data.frame(cl=1:3))

Run the code above in your browser using DataLab