Skip to contents

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

Usage

as.long.table(x)

Arguments

x

A data.frame with the 'longTableDataMapper' attribute, containing three lists named assayCols, rowDataCols and colDataCols. This attribute is automatically created when coercing from a LongTable to a data.table.

Value

LongTable object configured with the longTableDataMapper

Examples

dataTable <- as(merckLongTable, 'data.table')
print(attr(dataTable, 'longTableDataMapper')) # Method doesn't work without this
#> <LongTableDataMapper> 
#> rawdata: NA 
#> rowDataMap:
#>   rowIDs: drug1id, drug2id, drug1dose, drug2dose
#>   rowMeta: combination_name
#> colDataMap:
#>   colIDs: sampleid, batchid
#>   colMeta: 
#> assayMap:
#>   sensitivity:
#>     keys: drug1id, drug2id, drug1dose, drug2dose, sampleid, batchid
#>     values: viability1, viability2, viability3, viability4
#>   profiles:
#>     keys: drug1id, drug2id, drug1dose, drug2dose, sampleid, batchid
#>     values: mu/muMax_published, X/X0_published
#> metadataMap: NA
as.long.table(dataTable)
#> 2024-03-25 15:58:14 Building assay index...
#> 2024-03-25 15:58:14 Joining rowData to assayIndex...
#> 2024-03-25 15:58:15 Joining colData to assayIndex...
#> 2024-03-25 15:58:15 Joining assays to assayIndex...
#> 2024-03-25 15:58:16 Setting assayIndex key...
#> 2024-03-25 15:58:17 Building LongTable...
#> 
#> <LongTable> 
#>    dim:  744 12 
#>    assays(2): sensitivity profiles 
#>    rownames(744): 5-FU:Bortezomib:0.35:0.00045 5-FU:Bortezomib:0.35:0.002 ... geldanamycin:Topotecan:0.0223:0.0223 geldanamycin:Topotecan:0.0223:0.0775 
#>    rowData(5): drug1id drug2id drug1dose drug2dose combination_name 
#>    colnames(12): A2058:1 A2058:3 A2780:1 ... CAOV3:1 CAOV3:2 CAOV3:3 
#>    colData(2): sampleid batchid 
#>    metadata(0): none