Description Usage Arguments Details Author(s) See Also Examples
cbind does not work when trying to combine
data.frames with differing numbers of rows. This
function takes a list of data.frames,
identifies how many extra rows are required to make
cbind work correctly, and does the combining for
you.
1 | CBIND(datalist)
|
datalist |
A |
The CBIND function also works with nested
lists by first "flattening" them using the
LinearizeNestedList function by Akhil S
Bhel.
Ananda Mahto
cbind, cbindX,
LinearizeNestedList
1 2 3 4 5 6 7 8 9 10 11 12 | # Example data
df1 <- data.frame(A = 1:5, B = letters[1:5])
df2 <- data.frame(C = 1:3, D = letters[1:3])
df3 <- data.frame(E = 1:8, F = letters[1:8], G = LETTERS[1:8])
CBIND(list(df1, df2, df3))
# Nested lists:
test1 <- list(list(df1, df2, df3), df1)
str(test1)
CBIND(test1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.