gmGeostats (version 0.11.3)

gsi.produceV: Create a matrix of logcontrasts and name prefix

Description

Given a representation specification for compositions, this function creates the matrix of logcontrasts and provides a suitable prefix name for naming variables.

Usage

gsi.produceV(
  V = NULL,
  D = nrow(V),
  orignames = rownames(V),
  giveInv = FALSE,
  prefix = NULL
)

Value

A list with at least two elements

  1. V containing the final matrix of logcontrasts

  2. prefix containing the final prefix for names of transformed variables

  3. W eventually, the (transposed, generalised) inverse of V, if giveInv=TRUE

Arguments

V

either a matrix of logcontrasts or, most commonly, one of "clr", "ilr" or "alr"

D

the number of components of the composition represented

orignames

the names of the components

giveInv

logical, is the inverse logcontrast matrix desired?

prefix

the desired prefix name, if this is wished to be forced.

Examples

Run this code
gsi.produceV("alr", D=3)
gsi.produceV("ilr", D=3, orignames = c("Ca", "K", "Na"))
gsi.produceV("alr", D=3, orignames = c("Ca", "K", "Na"), giveInv = TRUE)

Run the code above in your browser using DataLab