unlist2 | R Documentation |
Flatten lists
unlist2(x, ...)
## S4 method for signature 'DFrameList'
unlist2(x, nameCol = "name", rownameCol = "rowname")
x |
Object. |
nameCol |
|
rownameCol |
|
... |
Additional arguments. |
Intended primarily for complex S4 classes, such as DFrameList
.
Intentionally does not support recursion.
Unlisted object derived from original input.
For example, DFrame
derived from DFrameList
.
Updated 2024-01-04.
unlist()
.
## DFrameList ====
suppressPackageStartupMessages({
library(IRanges)
})
dfl <- DataFrameList(
"A" = DataFrame(
"a" = c(1L, 2L),
"b" = c(3L, 4L),
row.names = c("aa", "bb")
),
"B" = DataFrame(
"a" = 5L,
"b" = 6L,
row.names = "cc"
)
)
## Our variant, which assigns into columns.
x <- unlist2(dfl)
print(x)
## Compare with the standard variant, which modifies rownames.
y <- unlist(dfl)
print(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.