cayleymenger: Cayley-Menger Determinant

Description Usage Arguments Value Examples

View source: R/cayleymenger.R

Description

Cayley-Menger determinant is a formula of a n-dimensional simplex with respect to the squares of all pairwise distances of its vertices.

Usage

1

Arguments

data

an (n\times p) matrix of row-stacked observations.

Value

a list containing

det

determinant value.

vol

volume attained from the determinant.

Examples

1
2
3
4
5
6
7
## USE 'IRIS' DATASET
data(iris)
X = as.matrix(iris[,1:4])

## COMPUTE CAYLEY-MENGER DETERMINANT
#  since k=4 < n=149, it should be zero.
cayleymenger(X)

maotai documentation built on Oct. 25, 2021, 9:06 a.m.