Combine factors together by finding their common levels and re-making the factor.
fbind(...)
... | Two or more |
---|
A factor()
## 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 ffbind(a, b, x)#> [1] a b c d c d e f <NA> #> Levels: a b c d e f