fac.combine {dae}R Documentation

Combines several factors into one

Description

Combines several factors into one whose levels are the combinations of the used levels of the individual factors.

Usage

fac.combine(factors, order="standard", combine.levels=FALSE, sep=",")

Arguments

factors A list of factors all of the same length.
order The order in which the levels combinations of the factors are to be considered as numbered when forming the levels of the combined factor; standard numbers them as if they are arranged in standard order, that is with the first factor moving slowest and the last factor moving fastest; yates numbers them as if they are arranged in Yates order, that is with the first factor moving fastest and last factor moving slowest.
combine.levels A logical specifying whether the levels labels of the new factor are to be combined from those of the factors being combined. The default is to use the integers from 1 to the product of the numbers of combinations of used levels of the individual factors.
sep A character string to separate the levels when combine.levels=TRUE.

Value

A factor whose levels are formed form the observed combinations of the levels of the individual factors.

See Also

fac.divide

Examples

        AB <- fac.combine(list(A, B))

[Package dae version 0.4-1 Index]