compute_half_range: Compute range of axes for a tour

Description Usage Arguments Details Value Examples

View source: R/tour-utils.R

Description

Compute range of axes for a tour

Usage

1
compute_half_range(.data, center = TRUE)

Arguments

.data

A numeric matrix

center

Subtract colMeans(.data) from each column in .data? Default is TRUE.

Details

This function computes the maximum squared Euclidean distance of rows in a matrix like object. Mostly used internally for setting up xy-axis ranges for a tour animation.

Value

A numeric vector of length 1.

Examples

1
2
3
4
5
mv <- matrix(rnorm(300), ncol = 3)

compute_half_range(mv)

compute_half_range(mv, center = FALSE)

liminal documentation built on May 28, 2021, 9:06 a.m.