Learn R Programming

mudata (version 0.1.1)

aggregate.qtag.long: Aggregate/Summarise a qualifier/tag structure

Description

Summarises a qtag object such that one value exists for every unique qualifier combination. This is useful for summarising replicates.

Usage

# S3 method for qtag.long
aggregate(x, ..., force = TRUE)

# S3 method for qtag.wide aggregate(x, ..., force = TRUE)

Arguments

x

A qtag object

...

A parameter including at least one unnamed parameter for summarising values. Additional parameters may be used for aggregating a long format.

force

Use force=FALSE to only aggregate if the object is not already summarised.

Value

A (possibly unchanged) qtag object

Examples

Run this code
# NOT RUN {
data(pocmaj)
pocmajqt <- as.qtag(pocmaj, id.vars=c("core", "depth"))
aggregate(pocmajqt)
aggregate(pocmajqt, mean)
aggregate(long(pocmajqt), mean, sd, length)

# }

Run the code above in your browser using DataLab