Description Usage Arguments Value Examples
Allows use of the colData and rowData 'data.table' objects to query based on rowID and colID, which is then used to subset all value data.tables stored in the dataList slot. This function is endomorphic, it always returns a LongTable object.
1 2 |
x |
['LongTable'] The object to subset. |
i |
['character'], ['numeric'], ['logical'] or ['expression'] Character: pass in a character vector of drug names, which will subset the object on all row id columns matching the vector. Numeric or Logical: these select based on the rowKey from the 'rowData' method for the 'LongTable'. Call: Accepts valid query statements to the 'data.table' i parameter, this can be used to make complex queries using the 'data.table' API for the 'rowData' data.table. |
j |
['character'], ['numeric'], ['logical'] or ['expression'] Character: pass in a character vector of drug names, which will subset the object on all drug id columns matching the vector. Numeric or Logical: these select based on the rowID from the 'rowData' method for the 'LongTable'. Call: Accepts valid query statements to the 'data.table' i parameter, this can be used to make complex queries using the 'data.table' API for the 'colData' data.table. |
assays |
['character', 'numeric' or 'logical'] Optional list of assay names to subset. Can be used to subset the assays list further, returning only the selected items in the new LongTable. |
reindex |
['logical'] Should the col/rowKeys be remapped after subsetting. defaults to TRUE. For chained subsetting you may be able to get performance gains by setting to FALSE and calling reindex() manually after subsetting is finished. |
['LongTable'] A new 'LongTable' object subset based on the specified parameters.
1 2 3 4 5 6 7 8 9 | # Character
subset(merckLongTable, 'CAOV3', 'ABT-888')
# Numeric
subset(merckLongTable, 1, c(1, 2))
# Logical
subset(merckLongTable, rowData(merckLongTable)$cell_line1 == 'A2058')
# Call
subset(merckLongTable, cell_line1 == 'A2058',
drug1 == 'Dasatinib' & drug2 != '5-FU')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.