as {CoreGx} | R Documentation |
Coerce a LongTable into a data.table
.
S3 version of coerce method for convenience.
Currently only supports coercing to data.table or data.frame
S3 version of coerce method fro convenience.
Coerce a data.table with the proper configuration attributes back to a LongTable
## S3 method for class 'long.table' as.data.table(from) ## S3 method for class 'long.table' as.data.frame(x, row.names, optional = TRUE, ...)
from |
|
x |
|
row.names |
An optional |
optional |
|
... |
Does nothing. |
A data.table
with the data from a LongTable.
A data.table
containing the data from the LongTable, as well
as the ‘longTableDataMapper’ attribute which contains the data needed to
reverse the coercion.
data.table
containing the data from the LongTable, with the
‘longTableDataMapper’ attribute containg the metadata needed to reverse
the coercing operation.
data.frame
containing the data from the LongTable, with the
‘longTableDataMapper’ attribute containg the metadata needed to reverse
the coercion operation.
LongTable
object configured with the longTableDataMapper
data.table
with long format of data in from
data.frame
with long format of data in from
.
SummarizedExperiment
with each assay as a BumpyMatrix
as(merckLongTable, 'data.table') as(merckLongTable, 'data.frame') dataTable <- as(merckLongTable, 'data.table') print(attr(dataTable, 'longTableDataMapper')) # Method doesn't work without this as(dataTable, 'LongTable') SE <- molecularProfilesSlot(clevelandSmall_cSet)[[1]] as(SE, 'data.table') SE <- molecularProfilesSlot(clevelandSmall_cSet)[[1]] as(SE, 'data.frame')