Accessing and modifying data in a LongTableDataMapper
object.
LongTableDataMapper-accessors.Rd
Documentation for the various setters and getters which allow manipulation
of data in the slots of a LongTableDataMapper
object.
Usage
# S4 method for LongTableDataMapper,list
rawdata(object) <- value
# S4 method for LongTableDataMapper
rowDataMap(object)
# S4 method for LongTableDataMapper,list_OR_List
rowDataMap(object) <- value
# S4 method for LongTableDataMapper
colDataMap(object)
# S4 method for LongTableDataMapper,list_OR_List
colDataMap(object) <- value
# S4 method for LongTableDataMapper
assayMap(object)
# S4 method for LongTableDataMapper,list_OR_List
assayMap(object) <- value
# S4 method for LongTableDataMapper
metadataMap(object)
# S4 method for LongTableDataMapper,list_OR_List
metadataMap(object) <- value
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
orList
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
orList
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 theS4
object theLongTableDataMapper
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
ofcharacter
vectors. The name of each list item is the name of the item in the@metadata
slot of theLongTableDataMapper
object created whenmetaConstruct
is called on theDataMapper
, and a character vector specifies the columns of@rawdata
to assign to each item.
See also
Other DataMapper-accessors:
DataMapper-accessors
,
TREDataMapper-accessors
Examples
rowDataMap(exampleDataMapper)
#> list()
rowDataMap(exampleDataMapper) <- list(c('treatmentid'), c())
colDataMap(exampleDataMapper)
#> list()
colDataMap(exampleDataMapper) <- list(c('sampleid'), c())
assayMap(exampleDataMapper)
#> list()
assayMap(exampleDataMapper) <- list(sensitivity=c(viability1='viability'))
metadataMap(exampleDataMapper)
#> list()
metadataMap(exampleDataMapper) <- list(object_metadata=c('metadata'))