Combines named vectors into a matrix with the rows being the names of the vector elements, and the columns being the name of the source vector.

vectorBind(...)

Arguments

...

The objects that need to be combined.

Value

A matrix.

References

http://stackoverflow.com/q/25639223/1270695

Author

Ananda Mahto

Examples

set.seed(1) t1 <- table(sample(LETTERS[c(1, 2, 4)], 20, TRUE)) t2 <- table(sample(LETTERS[c(1, 2, 3)], 20, TRUE)) t3 <- table(sample(LETTERS[c(2, 4, 5)], 20, TRUE)) vectorBind(t1, t2, t3)
#> t1 t2 t3 #> A 7 8 NA #> B 7 8 4 #> D 6 NA 12 #> C NA 4 NA #> E NA NA 4