Skip to contents

Aggregate the elements of a contactmatrix_list into a single contact_matrix

Usage

# S3 method for class 'contactmatrix_list'
aggregate(x, by, FUN = mean, ...)

Arguments

x

A contactmatrix_list to aggregate

by

Ignored for now

FUN

Function to use to aggregate the elements of x into the output. Defaults to mean.

...

Additional arguments passed to FUN

Value

A contact_matrix with the same groupings and same groups (in practice, same dimnames()) as all elements of the original contactmatrix_list x.