sub-LongTable-ANY-ANY-ANY-method: [ LongTable Method

Description Usage Arguments Details Value Examples

Description

Single bracket subsetting for a LongTable object. See subset for more details.

Usage

1
2
## S4 method for signature 'LongTable,ANY,ANY,ANY'
x[i, j, assays, ..., drop = FALSE]

Arguments

x

['LongTable'] The object to subset.

i

['character'], ['numeric'], ['logical'] or ['call'] Character: pass in a character vector of drug names, which will subset the object on all row id columns matching the vector. This parameter also supports valid R regex query strings which will match on the colnames of 'x'. For convenience, * is converted to .* automatically. Colon can be to denote a specific part of the colnames string to query. 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 as a call object. We have provided the function .() to conveniently convert raw R statements into a call for use in this function.

j

['character'], ['numeric'], ['logical'] or ['call'] Character: pass in a character vector of drug names, which will subset the object on all drug id columns matching the vector. This parameter also supports regex queries. Colon can be to denote a specific part of the colnames string to query. 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 as a call object. We have provided the function .() to conveniently convert raw R statements into a call for use in this function.

assays

['character'] Names of assays which should be kept in the 'LongTable' after subsetting.

...

Included to ensure drop can only be set by name.

drop

[‘logical'] Included for compatibility with the ’[' primitive, it defaults to FALSE and changing it does nothing.

Details

This function is endomorphic, it always returns a LongTable object.

Value

A ['LongTable'] containing only the data specified in the function parameters.

Examples

1
2
3
4
5
6
7
8
9
# Character
merckLongTable['CAOV3', 'ABT-888']
# Numeric
merckLongTable[1, c(1, 2)]
# Logical
merckLongTable[rowData(merckLongTable)$cell_line1 == 'A2058', ]
# Call
merckLongTable[.(cell_line1 == 'A2058'),
  .(drug1 == 'Dasatinib' & drug2 != '5-FU')]

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