Description Usage Arguments Value Author(s) Examples
A wrapper for rbind
and cbind
to quickly bind
numerous objects together at once using a single call to rbind
or
cbind
. This function is most helpful when there are
many objects to bind and the object names are easily represented in text.
1 |
objects |
A character vector with the names of the objects to be bound together |
type |
The type of binding, "row" for |
The bound object
Landon Sego
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Row binding
a1 <- data.frame(a = 1:3, b = rnorm(3), c = runif(3))
a2 <- data.frame(a = 4:6, b = rnorm(3), c = runif(3))
a3 <- data.frame(a = 7:9, b = rnorm(3), c = runif(3))
qbind(paste("a", 1:3, sep = ""))
# Column binding
b1 <- matrix(1:9, nrow = 3, dimnames = list(1:3, letters[1:3]))
b2 <- matrix(10:18, nrow = 3, dimnames = list(4:6, letters[4:6]))
b3 <- matrix(19:27, nrow = 3, dimnames = list(7:9, letters[7:9]))
qbind(paste("b", 1:3, sep = ""), type = "col")
# Concatenating a vector
a1 <- c(x = 1, y = 2)
a2 <- c(z = 3, w = 4)
qbind(c("a1", "a2"), type = "c")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.