cchebyshev: Calculate the p_values matrix for each species, using...

View source: R/cmahalanobis.R

cchebyshevR Documentation

Calculate the p_values matrix for each species, using Chebyshev distance as a base.

Description

This function takes a dataset, a factor, a p_value method, number of bootstraps and permutation when necessary, and returns a p_values matrix between each pair of species and a plot if the user select TRUE using the Chebyshev distance for the distances calculation.

Usage

cchebyshev(
  dataset,
  formula,
  plot = TRUE,
  plot_title = "Chebyshev Distance Between Groups"
)

Arguments

dataset

A dataframe.

formula

A factor which you want to calculate Chebyshev distance.

plot

If TRUE, displays a plot of distances.

plot_title

The title of plot.

Value

A matrix containing distances and, optionally, the plot.

Examples

# Example with iris dataset

cchebyshev(iris, ~Species, plot = TRUE, plot_title = "Chebyshev Distance Between Groups")

# Example with mtcars dataset

cchebyshev(mtcars, ~am, plot = TRUE, plot_title = "Chebyshev Distance Between Groups")



cmahalanobis documentation built on April 3, 2025, 8:51 p.m.