join {conf.design}R Documentation

Amalgamate two or more factors.

Description

Joins two or more factors together into a single composite factor defining the subclasses. In a model formula join(f1, f2, f3) is equivalent to f1:f2:f3.

Usage

join(...)

Arguments

...

Two or more factors or numeric vectors, or lists containing these kinds of component.

Details

Similar in effect to paste, which it uses.

Value

A single composite factor with levels made up of the distinct combinations of levels or values of the arguments which occur.

Side Effects

None.

See Also

:, paste, rjoin, direct.sum

Examples

within(data.frame(f = gl(2, 3)), {
  g <- gl(3,2,length(f))
  fg <- join(f, g)
})
###   f  fg g
### 1 1 1:1 1
### 2 1 1:1 1
### 3 1 1:2 2
### 4 2 2:2 2
### 5 2 2:3 3
### 6 2 2:3 3

[Package conf.design version 2.0.0 Index]