Expand: Create a Data Frame from All Combinations of Factors

Description Usage Arguments Details Author(s) Examples

View source: R/Expand.R

Description

Create a Data Frame from All Combinations of Factors

Usage

1
Expand(`_data`, ...)

Arguments

_data

Data.frame

...

vectors, factors or a list containing these

Details

Simple wrapper of the 'expand.grid' function. If x is a table then a data frame is returned with one row pr individual observation.

Author(s)

Klaus K. Holst

Examples

1
2
3
4
5
dd <- Expand(iris, Sepal.Length=2:8, Species=c("virginica","setosa"))
summary(dd)

T <- with(warpbreaks, table(wool, tension))
Expand(T)

lava documentation built on Sept. 5, 2021, 5:43 p.m.