Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

join

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

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

conf.design

Construction of factorial designs

v2.0.0
GPL-2
Authors
Bill Venables
Initial release
2013-02-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.