Aggregate: A Simple Aggregation Mechanism.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/methods-aggregator.R

Description

Given an environment and an aggregator (an object of class aggregate simple aggregations are made.

Usage

1
Aggregate(x, agg)

Arguments

x

The data to be aggregated.

agg

The aggregator to be used.

Details

Given some data, x the user can accumulate (or aggregate) information in env using the two supplied functions. See the accompanying documentation for a more complete example of this function and its use.

Value

No value is returned. This function is evaluated purely for side effects. The symbols and values in env are altered.

Author(s)

R. Gentleman

See Also

new.env, class:aggregator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  agg1 <- new("aggregator")
  Aggregate(letters[1:10], agg1)
  # the first 10 letters should be symbols in env1 with values of 1
  Aggregate(letters[5:11], agg1)
  # now letters[5:10] should have value 2
  bb <- mget(letters[1:11], env=aggenv(agg1), ifnotfound=NA)
  t1 <- as.numeric(bb); names(t1) <- names(bb)
  t1
# a b c d e f g h i j k
# 1 1 1 1 2 2 2 2 2 2 1

Biobase documentation built on Nov. 8, 2020, 6:52 p.m.