join: Amalgamate two or more factors.

Description Usage Arguments Details Value Side Effects See Also Examples

View source: R/conf.design.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

conf.design documentation built on May 2, 2019, 4:02 p.m.