cat.factor: Combine Several Factors

cat.factorR Documentation

Combine Several Factors

Description

Combine (concatenate) several factor objects, to produce a factor.

Usage

cat.factor(...)

Arguments

...

Any number of arguments. Each argument should be a factor, or will be converted to a factor.

Details

The arguments ... are concatenated as they would be using c() or cat(), except that factor levels are retained and merged correctly. See the Examples.

Value

A factor, whose length is the sum of the lengths of all arguments. The levels of the resulting factor are the union of the levels of the arguments.

Author(s)

\rolf

.

See Also

c.

Examples

   f <- factor(letters[1:3])
   g <- factor(letters[3:5])
   f
   g
   cat(f,g)
   c(f,g)
   cat.factor(f, g)

spatstat.utils documentation built on Oct. 24, 2023, 9:08 a.m.