LongTableDataMapper-accessors: Accessing and modifying data in a 'LongTableDataMapper'...

LongTableDataMapper-accessorsR Documentation

Accessing and modifying data in a LongTableDataMapper object.

Description

Documentation for the various setters and getters which allow manipulation of data in the slots of a LongTableDataMapper object.

Usage

## S4 replacement method for signature 'LongTableDataMapper,list'
rawdata(object) <- value

## S4 method for signature 'LongTableDataMapper'
rowDataMap(object)

## S4 replacement method for signature 'LongTableDataMapper,list_OR_List'
rowDataMap(object) <- value

## S4 method for signature 'LongTableDataMapper'
colDataMap(object)

## S4 replacement method for signature 'LongTableDataMapper,list_OR_List'
colDataMap(object) <- value

## S4 method for signature 'LongTableDataMapper'
assayMap(object)

## S4 replacement method for signature 'LongTableDataMapper,list_OR_List'
assayMap(object) <- value

## S4 method for signature 'LongTableDataMapper'
metadataMap(object)

## S4 replacement method for signature 'LongTableDataMapper,list_OR_List'
metadataMap(object) <- value

Arguments

object

A LongTableDataMapper object to get or set data from.

value

See details.

Details

rawdata: Get the raw data slot from a LongTableDataMapper object. Returns a list-like containing one or more raw data inputs to the LongTableDataMapper object.

rawdata: Set the raw data slot from a LongTableDataMapper object. value: The list-like object to set for the rawdata slot. Note: this currently only supports data.frame or data.table objects.

rowDataMap: list of two character vectors, the first are the columns required to uniquely identify each row of a LongTableDataMapper and the second any additional row-level metadata. If the character vectors have names, the resulting columns are automatically renamed to the item name of the specified column.

rowDataMap<-: Update the ⁠@rowDataMap⁠ slot of a LongTableDataMapper object, returning an invisible NULL. Arguments:

  • value: A list or List where the first item is the names of the identifier columns – columns needed to uniquely identify each row in rowData – and the second item is the metadata associated with those the identifier columns, but not required to uniquely identify rows in the object rowData.

colDataMap: list of two character vectors, the first are the columns required to uniquely identify each row of a LongTableDataMapper and the second any additional col-level metadata. If the character vectors have names, the resulting columns are automatically renamed to the item name of the specified column.

colDataMap<-: Update the ⁠@colDataMap⁠ slot of a LongTableDataMapper object, returning an invisible NULL. Arguments:

  • value: A list or List where the first item is the names of the identifier columns – columns needed to uniquely identify each row in colData – and the second item is the metadata associated with those the identifier columns, but not required to uniquely identify rows in the object rowData.

assayMap: A list of character vectors. The name of each list item will be the assay in a LongTableDataMapper object that the columns in the character vector will be assigned to. Column renaming occurs automatically when the character vectors have names (from the value to the name).

assayMap<-: Updates the ⁠@assayMap⁠ slot of a LongTableDataMapper object, returning an invisible NULL. Arguments:

  • value: A list of character vectors, where the name of each list item is the name of an assay and the values of each character vector specify the columns mapping to the assay in the S4 object the LongTableDataMapper constructs.

metadataMap: A list of character vectors. Each item is an element of the constructed objects ⁠@metadata⁠ slot.

metadataMap<-: Updates LongTableDataMapper object in-place, then returns an invisible(NULL). Arguments:

  • value: A list of character vectors. The name of each list item is the name of the item in the ⁠@metadata⁠ slot of the LongTableDataMapper object created when metaConstruct is called on the DataMapper, and a character vector specifies the columns of ⁠@rawdata⁠ to assign to each item.

Value

Accessors: See details

Setters: An update LongTableDataMapper object, returned invisibly.

See Also

Other DataMapper-accessors: DataMapper-accessors, TREDataMapper-accessors

Examples

rowDataMap(exampleDataMapper)

rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())

colDataMap(exampleDataMapper)

colDataMap(exampleDataMapper) <- list(c('sampleid'), c())

assayMap(exampleDataMapper)

assayMap(exampleDataMapper) <- list(sensitivity=c(viability1='viability'))

metadataMap(exampleDataMapper)

metadataMap(exampleDataMapper) <- list(object_metadata=c('metadata'))


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