bhklab / CoreGx

Shared code for both PharmacoGx and RadioGx
https://bhklab.github.io/CoreGx/
GNU General Public License v3.0
2 stars 3 forks source link

Unclear documentation for parameters in subset,LongTable-method #160

Closed p-smirnov closed 1 year ago

p-smirnov commented 1 year ago

I would fix it myself, but I'm not 100% sure I understand everything the method is supposed to do. In particular, what confuses me is that the documentation for the i and j parameter is very similar:


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.

Should all instances of rowData in the j description be replaced with colData? Additionally, I think the inclusion of "drug names" is confusing since LongTable doesn't refer to drugs in particular (just row and column ids). Also, for j when passing in a call, should it be any valid data.table j parameter?

ChristopherEeles commented 1 year ago

When they are calls i and j are evaluated as the i argument in the data.table for rowData and colData, respectively.