cbindList | R Documentation |
merge a list in which are all data.frame with one common rowname or one common column number
cbindList(List, ID = 0, replace = NA, sep = ".", fast = FALSE)
List |
a list of data frame. |
ID |
The number of column, or the column name that need to be refered. If ID = 0, then the row names of each data frame will be used. |
replace |
The value to replace the NAs that generated by cbind of data frame. |
sep |
seperation character of the column names in the data frame and the corresponding list index. The default is sep = ".". |
fast |
using cbind if the rownames of each element in the |
includeColId |
Logical. Include the refered column if it is TRUE |
A combined data frame, in which the colnames are the colnames in the original data frame and corresponding list index
{
## Not run:
# The zeros/ones matrix
a = data.frame(a = letters[1:5], b = rnorm(5))
b = data.frame(a = letters[3:7], c = rnorm(5))
x = list(a, b)
cbindList(List = x, ID = 1)
cbindList(List = x, ID = 0)
cbindList(List = x, ID = "a")
cbindList(List = x, ID = "a", replace = 0)
cbindList(List = x, ID = "a", replace = 0, sep = "_")
## End(Not run)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.