as: LongTable to data.table conversion

Description Arguments Value Examples

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

to

[‘character'] Class name to coerce to, currently only ’data.table' and 'data.frame' are supported

from

A [‘data.table'] with the ’LongTable.config' attribute, containing three lists named assayCols, rowDataCols and colDataCols. This attribute is automatically created when coercing from a 'LongTable' to a 'data.table'.

Value

A ['data.table'] with the data from a LongTable.

['data.table'] containing the data from the LongTable, with the ‘LongTable.config’ attribute containg the metadata needed to reverse the coercing operation.

['LongTable'] object configured with the LongTable.config

Examples

1
2
3
4
5
as(merckLongTable, 'data.table')

dataTable <- as(merckLongTable, 'data.table')
print(attr(dataTable, 'LongTable.config')) # Method doesn't work without this
as(dataTable, 'LongTable')

CoreGx documentation built on Nov. 8, 2020, 4:50 p.m.