Learn R Programming

multilevelcoda (version 1.3.1)

build.basesub: Build Base Pairwise Substitution

Description

Make a data set of all possible pairwise substitution of a composition which can be used as the base for substitution models.

Usage

build.basesub(parts, comparison = NULL)

Value

A data table of all possible pairwise substitution.

Arguments

parts

A character vector specifying the names of compositional variables to be used.

comparison

Either "one-to-one" or "one-to-all". Default is "one-to-one".

Examples

Run this code
ps1 <- build.basesub(parts = c("TST", "WAKE", "MVPA", "LPA", "SB"))
print(ps1)

ps2 <- build.basesub(c("WAKE", "MVPA", "LPA", "SB"), comparison = "one-to-all")
print(ps2)

Run the code above in your browser using DataLab