aggregate_fv | R Documentation |
Aggregate information in fv.objects by sample clustering.
aggregate_fv(
X,
by = stop("must specify `by`"),
f_aggr_ = pmean,
mc.cores = getOption("mc.cores"),
...
)
X |
a groupedHyperframe, containing one or more fv.object column(s) |
by |
one-sided formula, sample clustering.
Use only one-level hierarchy (e.g., |
f_aggr_ |
see function |
mc.cores |
integer scalar, see function mclapply.
Default is 1L on Windows, or detectCores on Mac.
CRAN requires |
... |
additional parameters, currently not in use |
Function aggregate_fv()
returns a data.frame, with
aggregated information stored in matrix-columns.
Note that hyperframe does not support
matrix-column (for good reasons!).
Therefore, function aggregate_fv()
must return a data.frame,
instead of a hyperframe.
library(spatstat.data)
library(spatstat.geom)
flu$pattern[] = flu$pattern |>
lapply(FUN = `mark_name<-`, value = 'stain') # read ?flu carefully
r = seq.int(from = 0, to = 100, by = 5)
flu |>
subset(stain == 'M2-M1') |>
as.groupedHyperframe(group = ~ virustype/frameid) |>
Gcross_(i = 'M1', j = 'M2', r = r, correction = 'best') |>
aggregate_fv(by = ~ virustype)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.