to_lower_simplex: move df to simplex representation

Description Usage Arguments Value Examples

View source: R/containment-and-band-creation.R

Description

This function takes a data.frame, moves it to unit simplex representation and then projects the points onto a lower representation space (using A).

Usage

1

Arguments

df

an n x p data.frame, all scalar columns

A

default is NULL, if so, we create A from simplex_project_mat

Value

updated dat.frame (n x k), where k should be p-1, but that's assuming A is made from simplex_project_mat

Examples

1
2
3
4
5
center <- data.frame(x = 1, y = 1, z = 1)
to_lower_simplex(center) # 0,0 # center

side <- data.frame(x = 1, y = 0, z =0)
to_lower_simplex(side) #(1,0)

skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.