local_biplot: Create local biplot axes

View source: R/mdessence-functions.R

local_biplotR Documentation

Create local biplot axes

Description

Create local biplot axes

Usage

local_biplot(
  X,
  dist,
  dist_deriv = NULL,
  k = 2,
  samples = 1:nrow(X),
  new_points = list()
)

Arguments

X

A data matrix, samples as rows.

dist

Either a string describing one of the supported distances or a function that takes a matrix and returns the distances between the rows of the matrix.

dist_deriv

Either NULL (if dist is a string describing one of the supported distances) or a function that takes two vectors and computes \frac{\partial}{\partial y_j}d(x,y).

k

The number of embedding dimensions.

samples

The samples to compute local biplot axes at. Defaults to all of the original samples.

new_points

New points (not one of the original samples) to compute local biplot axes at.

Value

A data frame. Each row describes one LB axis for one sample. Columns labeled 'Embedding' give the embedding of the sample in MDS space, columns labeled 'Axis' give the LB axis for a given sample and variable. Columns labeled 'variable' and 'sample' give the variable and sample for the LB axis values.


jfukuyama/localBiplots documentation built on Jan. 10, 2023, 3:33 a.m.