LongTable: LongTable constructor method

Description Usage Arguments Value

View source: R/class-LongTable.R

Description

Builds a 'LongTable' object from rectangular objects. The 'rowData' argument should contain row level metadata, while the 'colData' argument should contain column level metadata, for the experimental assays in the 'assays' list. The 'rowIDs' and 'colIDs' lists are used to configure the internal keys mapping rows or columns to rows in the assays. Each list should contain at minimum one character vector, specifying which columns in 'rowData' or 'colData' are required to uniquely identify each row. An optional second character vector can be included, specifying any metadata columns for either dimension. These should contain information about each row but NOT be required to uniquely identify a row in the 'colData' or 'rowData' objects. Additional metadata can be attached to a 'LongTable' by passing a list to the metadata argument.

Usage

1
2
3
4
5
6
7
8
9
LongTable(
  rowData,
  rowIDs,
  colData,
  colIDs,
  assays,
  metadata = list(),
  keep.rownames = FALSE
)

Arguments

rowData

['data.table', 'data.frame', 'matrix'] A table like object coercible to a 'data.table' containing the a unique 'rowID' column which is used to key assays, as well as additional row metadata to subset on.

rowIDs

['character', 'integer'] A vector specifying the names or integer indexes of the row data identifier columns. These columns will be pasted together to make up the row.names of the 'LongTable' object.

colData

['data.table', 'data.frame', 'matrix'] A table like object coercible to a 'data.table' containing the a unique 'colID' column which is used to key assays, as well as additional column metadata to subset on.

colIDs

['character', 'integer'] A vector specifying the names or integer indexes of the col data identifier columns. These columns will be pasted together to make up the col.names of the 'LongTable' object.

assays

A ['list'] containing one or more objects coercible to a 'data.table', and keyed by rowID and colID corresponding to the rowID and colID columns in colData and rowData.

metadata

A ['list'] of metadata associated with the 'LongTable' object being constructed

keep.rownames

['logical' or 'character'] Logical: whether rownames should be added as a column if coercing to a 'data.table', default is FALSE. If TRUE, rownames are added to the column 'rn'. Character: specify a custom column name to store the rownames in.

Value

A ['LongTable'] object containing the data for a treatment response experiment and configured according to the rowIDs and colIDs arguments.


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