endoaggregate,LongTable-method | R Documentation |
LongTable
or
inheriting classCompute a group-by operation over a LongTable
object or its inhering
classes.
## S4 method for signature 'LongTable'
endoaggregate(
x,
...,
assay,
target = assay,
by,
subset = TRUE,
nthread = 1,
progress = TRUE,
BPPARAM = NULL,
enlist = TRUE,
moreArgs = list()
)
x |
|
... |
|
assay |
|
target |
|
by |
|
subset |
|
nthread |
|
progress |
|
BPPARAM |
|
enlist |
|
moreArgs |
|
Arguments in ...
are substituted and wrapped in a list, which is passed
through to the j argument of [.data.table
internally. The function currently
tries to build informative column names for unnamed arguments in ...
by
appending the name of each function call with the name of its first argument,
which is assumed to be the column name being aggregated over. If an argument
to ...
is named, that will be the column name of its value in the resulting
data.table
.
The primary use case for enlist=FALSE
is to allow computation of dependent
aggregations, where the output from a previous aggregation is required in a
subsequent one. For this case, wrap your call in {
and assign intermediate
results to variables, returning the final results as a list where each list
item will become a column in the final table with the corresponding name.
Name inference is disabled for this case, since it is assumed you will name
the returned list items appropriately.
A major advantage over multiple calls to aggregate
is that
the overhead of parallelization is paid only once even for complex multi-step
computations like fitting a model, capturing its paramters, and making
predictions using it. It also allows capturing arbitrarily complex calls
which can be recomputed later using the
update,TreatmentResponseExperiment-method
A potential disadvantage is increased RAM usage per
thread due to storing intermediate values in variables, as well as any
memory allocation overhead associate therewith.
Object with the same class as x
, with the aggregation results
assigned to target
, using strategy
if target
is an existing assay in
x
.
data.table::[.data.table
, BiocParallel::bplapply
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.