get_coords: Computes unconstrained null space coodinates for...

View source: R/composite_coodinates.R

get_coordsR Documentation

Computes unconstrained null space coodinates for compositional data.

Description

Computes unconstrained null space coodinates for compositional data.

Usage

get_coords(x)

Arguments

x

Compositional data in a dataframe or matrix. The rows need to add up to a constrant value

Value

A list with the following components:

y

The unconstrained coordinates of the input

vec

The basis vectors for the null space coordinates

Examples

set.seed(100)
n <- 600
x <- sample(1:100, n, replace=TRUE)
x2 <- sample(1:100, n, replace=TRUE)
x3 <- sample(1:100, n, replace=TRUE)
x4 <- sample(1:100, n, replace=TRUE)
X <- cbind.data.frame(x, x2, x3, x4)
X <- X/apply(X, 1, sum)
out <- get_coords(X)


composits documentation built on May 25, 2022, 9:11 a.m.