aggregate.nlist: Aggregate nlist

Description Usage Arguments Value See Also Examples

View source: R/aggregate.R

Description

Aggregates an nlist_object() into a named list of numeric scalars.

Usage

1
2
## S3 method for class 'nlist'
aggregate(x, fun = mean, ...)

Arguments

x

An nlist object.

fun

A function that given a numeric vector returns a numeric scalar.

...

Additional arguments passed to fun.

Value

An named list of numeric scalars

See Also

Other aggregate: aggregate.nlists()

Examples

1
2
aggregate(nlist(x = 1:9))
aggregate(nlist(y = 3:5, zz = matrix(1:9, 3)), fun = function(x) x[1])

nlist documentation built on Sept. 5, 2021, 6:05 p.m.