as: Coerce a 'LongTable' to a 'TreatmentResponseExperiment'

asR Documentation

Coerce a LongTable to a TreatmentResponseExperiment

Description

Coerce a LongTable into a data.table.

Currently only supports coercing to data.table or data.frame

Coerce a data.table with the proper configuration attributes back to a LongTable

Arguments

from

A LongTableDataMapper to coerce.

Value

The data in object, as the child-class TreatmentResponseExperiment.

A data.table with the data from a LongTable.

data.table containing the data from the LongTable, with the ‘longTableDataMapper’ attribute containg the metadata needed to reverse the coercing 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

A TREDataMapper object.

See Also

TreatmentResponseExperiment

BumpyMatrix::BumpyMatrix

Examples

data(clevelandSmall_cSet)
TRE <- as(treatmentResponse(clevelandSmall_cSet),
    "TreatmentResponseExperiment")
TRE

as(merckLongTable, 'data.table')

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')


bhklab/CoreGx documentation built on March 14, 2024, 3:04 a.m.