Description Usage Arguments Value Examples
This function attempts to replicate rbindlist
for columns.
1 | cbindlist(target)
|
target |
Type: list. A list to perform |
A data.table based on target
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(data.table)
# Create named junk list
mega_list <- list(a = rnorm(1000),
b = rnorm(1000),
c = rnorm(1000),
d = rnorm(1000),
e = rnorm(1000),
f = rnorm(1000),
g = rnorm(1000))
# Perform cbindlist, equivalent of rbindlist but for columns, accepting only vectors
my_dt <- cbindlist(mega_list)
# Check column name correctness/coverage
sum(colnames(my_dt) == c("a", "b", "c", "d", "e", "f", "g")) / 7 # 100% coverage
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.