as.DataFrame | R Documentation |
Coerce object to S4 DataFrame
as.DataFrame(x, ...)
## S4 method for signature 'GRanges'
as.DataFrame(x)
## S4 method for signature 'IRanges'
as.DataFrame(x)
## S4 method for signature 'Matrix'
as.DataFrame(x)
## S4 method for signature 'SimpleList'
as.DataFrame(x)
## S4 method for signature 'data.frame'
as.DataFrame(x)
## S4 method for signature 'list'
as.DataFrame(x)
## S4 method for signature 'matrix'
as.DataFrame(x)
x |
Object. |
... |
Additional arguments. |
DataFrame
.
Updated 2023-10-06.
data(GRanges, sparseMatrix, package = "AcidTest")
## `GRanges` to `DFrame` ====
from <- GRanges
to <- as.DataFrame(from)
print(to)
## `Matrix` to `DFrame` ====
from <- sparseMatrix
to <- as.DataFrame(from)
print(to)
## `list` to `DFrame` ====
from <- list(
"a" = list(c(1, 2), c(3, 4)),
"b" = list(NULL, NULL)
)
to <- as.DataFrame(from)
print(to)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.