fac.genfactors {dae} R Documentation

## Generate all combinations of the levels of the supplied factors, without replication

### Description

Generate all combinations of the levels of the supplied factors, without replication. This function extracts the levels from the supplied factors and uses them to generate the new factors. On the other hand, the levels must supplied in the generate argument of the function fac.gen.

### Usage

fac.genfactors(factors, ...)

### Arguments

 factors A list of factors, or an object of factors that is coercible to a list. ... Further arguments passed to the fac.gen in creating the data.frame of new factors.

### Details

The levels of each factor are generated in standard order, unless order is supplied to fac.gen via the ‘...’ argument. The levels of the new factors will be in the same order as in the supplied factors.

### Value

A data.frame whose columns correspond to factors in the factors list. The values in a column are the generated levels of the factor. The number of rows in the data.frame will equal the product of the numbers of levels of the supplied factors.

### Author(s)

Chris Brien

fac.gen in package dae
## generate a treatments key for the Variety and Nitrogen treatments factors in Oats.dat