Learn R Programming

multilevelcoda (version 1.3.3)

mean.complr: Mean amounts and mean compositions presented in a complr object.

Description

Mean amounts and mean compositions presented in a complr object.

Usage

# S3 method for complr
mean(x, weight = c("equal", "proportional"), parts = 1, ...)

Arguments

x

An object of class complr.

weight

A character value specifying the weight to use in calculation of the reference composition. If "equal", give equal weight to units (e.g., individuals). If "proportional", weights in proportion to the frequencies of units being averaged (e.g., observations across individuals) Default is equal.

parts

A optional character string specifying names of compositional parts that should be considered in the substitution analysis. This should correspond to a single set of names of compositional parts specified in the complr object. Default to the first composition in the complr object.

...

generic argument, not in use.

Examples

Run this code
x <- complr(data = mcompd, sbp = sbp,
                parts = c("TST", "WAKE", "MVPA", "LPA", "SB"),
                idvar = "ID")
mean(x)

Run the code above in your browser using DataLab