Combine factors together by finding their common levels and re-making the factor.

fbind(...)

Arguments

...

Two or more factor()s you want to bind together.

Value

A factor()

Examples

## Create some data a <- factor(letters[1:4]) b <- factor(letters[3:6]) x <- factor("leo", "leonardo") ## Use fbind() with 2 or more factors fbind(a, b)
#> [1] a b c d c d e f #> Levels: a b c d e f
fbind(a, b, x)
#> [1] a b c d c d e f <NA> #> Levels: a b c d e f